Package org.geomajas.puregwt.client.spatial

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


    LinearRing shell = factory.createLinearRing(new Coordinate[] { new Coordinate(-10, -10), new Coordinate(10, 0),
        new Coordinate(-10, 10), new Coordinate(-10, -10) });
    LinearRing hole = factory.createLinearRing(new Coordinate[] { new Coordinate(-5, -5), new Coordinate(5, 0),
        new Coordinate(-5, 5), new Coordinate(-5, -5) });
    Polygon polygon = factory.createPolygon(shell, new LinearRing[] { hole });
    MultiPolygon mp = factory.createMultiPolygon(new Polygon[] { polygon });

    // World to screen:
    Geometry result = viewPort.transform(mp, RenderSpace.WORLD, RenderSpace.SCREEN);
    Coordinate c = result.getGeometryN(0).getGeometryN(0).getCoordinates()[0];
    Assert.assertEquals((MAP_WIDTH / 2) - (viewPort.getScale() * 10), c.getX(), DELTA);
View Full Code Here

TOP

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

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.