Package org.gwtopenmaps.openlayers.client.geometry

Examples of org.gwtopenmaps.openlayers.client.geometry.Polygon


    public boolean convertPolygonToMultiPolygon() {
        final Geometry g = this.getGeometry();

        if (g.getClassName().equals(
                org.gwtopenmaps.openlayers.client.geometry.Geometry.POLYGON_CLASS_NAME)) {
            final Polygon p = Polygon.narrowToPolygon(g.getJSObject());
            final MultiPolygon mp = new MultiPolygon(new Polygon[]{p});
            this.getJSObject().setProperty("geometry", mp.getJSObject());

            return true;
        } else {
View Full Code Here


            LonLat lonLat = LonLat.narrowToLonLat(destinationVincenty(center.lon(), center.lat(), angle, radius));
            lonLat.transform("EPSG:4326", map.getProjection());
            points[i] = new Point(lonLat.lon(), lonLat.lat());
        }
        LinearRing ring = new LinearRing(points);
        Polygon polygon = new Polygon(new LinearRing[] { ring });

        vectorLayer.addFeature(new VectorFeature(polygon));
        modifyControl.activate();
    }
View Full Code Here

    public boolean convertPolygonToMultiPolygon() {
        final Geometry g = this.getGeometry();

        if (g.getClassName().equals(
                org.gwtopenmaps.openlayers.client.geometry.Geometry.POLYGON_CLASS_NAME)) {
            final Polygon p = Polygon.narrowToPolygon(g.getJSObject());
            final MultiPolygon mp = new MultiPolygon(new Polygon[]{p});
            this.getJSObject().setProperty("geometry", mp.getJSObject());

            return true;
        } else {
View Full Code Here

      LonLat lonLat = LonLat.narrowToLonLat(destinationVincenty(center.lon(), center.lat(), angle, radius));
      lonLat.transform("EPSG:4326", map.getProjection());
      points[i] = new Point(lonLat.lon(), lonLat.lat());
    }
    LinearRing ring = new LinearRing(points);
    Polygon polygon = new Polygon(new LinearRing[]{ring});

    vectorLayer.addFeature(new VectorFeature(polygon));
    modifyControl.activate();
  }
View Full Code Here

TOP

Related Classes of org.gwtopenmaps.openlayers.client.geometry.Polygon

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.