Package org.geomajas.puregwt.client.spatial

Examples of org.geomajas.puregwt.client.spatial.MultiLineString


  @Test
  public void testTransformMultiLineString() {
    LineString ls1 = factory.createLineString(new Coordinate[] { new Coordinate(-5, 10), new Coordinate(10, 5) });
    LineString ls2 = factory.createLineString(new Coordinate[] { new Coordinate(5, -10), new Coordinate(-10, -5) });
    MultiLineString mls = factory.createMultiLineString(new LineString[] { ls1, ls2 });

    Geometry result = viewPort.transform(mls, RenderSpace.WORLD, RenderSpace.SCREEN);
    Coordinate coordinate = result.getGeometryN(0).getCoordinates()[0];
    Assert.assertEquals((MAP_WIDTH / 2) - (viewPort.getScale() * 5), coordinate.getX(), DELTA);
    Assert.assertEquals((MAP_HEIGHT / 2) - (viewPort.getScale() * 10), coordinate.getY(), DELTA);
View Full Code Here

TOP

Related Classes of org.geomajas.puregwt.client.spatial.MultiLineString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.