Package org.gwtopenmaps.openlayers.client

Examples of org.gwtopenmaps.openlayers.client.LonLat.transform()


        return markerLayer;
    }

    public LonLat createLonLat(double longitude, double latitude) {
        LonLat lonLat = new LonLat(longitude, latitude);
        lonLat.transform(new Projection("EPSG:4326").getProjectionCode(), map.getProjection());
        return lonLat;
    }

    public Point createPoint(double x, double y) {
        Point point = new Point(x, y);
View Full Code Here


    }
  }

  private void reDrawGeoFence(Map map) {
    LonLat center = map.getCenter();
    center.transform(map.getProjection(), DEFAULT_PROJECTION.getProjectionCode());
    removeGeoFence();

    Point[] points = new Point[40];

    int angle = 0;
View Full Code Here

    int angle = 0;
    for (int i = 0; i < 40; i++) {
      angle += 360 / 40;
      double radius = storeBinder.getModel().getRadius();
      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});
View Full Code Here

    map.setCenter(lonlat, zoomLevel);
  }

  private LonLat convertPoint(String mapProjection, LatLng center) {
    LonLat lonlat = new LonLat(center.getLongitude(), center.getLatitude());
    lonlat.transform(DEFAULT_PROJECTION.getProjectionCode(), mapProjection);
    return lonlat;
  }

  /**
   * Returns the store's geolocation if it's been set, or null if the store
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.