Examples of LonLat


Examples of org.gwtopenmaps.openlayers.client.LonLat

    public Markers getMarkerLayer() {
        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;
    }
View Full Code Here

Examples of org.gwtopenmaps.openlayers.client.LonLat

      });
    }
  }

  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;
    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});

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

Examples of org.gwtopenmaps.openlayers.client.LonLat

  private native JSObject destinationVincenty(double lon, double lat, int angle, double distance) /*-{
    return $wnd.OpenLayers.Util.destinationVincenty(new $wnd.OpenLayers.LonLat(lon, lat), angle, distance);
  }-*/;

  private void centerMap(Map map, LatLng center, int zoomLevel) {
    LonLat lonlat = convertPoint(map.getProjection(), center);
    map.setCenter(lonlat, zoomLevel);
  }
View Full Code Here

Examples of org.gwtopenmaps.openlayers.client.LonLat

    LonLat lonlat = convertPoint(map.getProjection(), center);
    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;
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

  @Override
  protected void onEvent(AjaxRequestTarget target) {
    Request request = RequestCycle.get().getRequest();
    String lon = request.getRequestParameters().getParameterValue("lon").toString();
    String lat = request.getRequestParameters().getParameterValue("lat").toString();
    LonLat lonLat = new LonLat(Double.parseDouble(lon), Double
        .parseDouble(lat));
    onClick(lonLat, target);

  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

  protected void onEvent(AjaxRequestTarget target) {
    Request request = RequestCycle.get().getRequest();

    Overlay overlay = null;
    LonLat latLng = null;

    String markerParameter = request.getRequestParameters().getParameterValue("marker").toString();
    if (markerParameter != null) {
      OpenLayersMap map=getOpenLayerMap();
      for (Overlay ovl : map.getOverlays()) {
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

        marker.getPopup());
    getOpenLayerMap().getInfoWindow().setContent(marker.getPopup());
    target.addComponent(marker.getPopup());
    jsToRun = mapId
        + ".popup = new OpenLayers.Popup('map', "
        + new LonLat(marker.getLonLat().getLng(), marker.getLonLat()
            .getLat()) + ", "
        + new Size(195, 250).getJSconstructor()
        + ", document.getElementById(" + mapId
        + ".popupId).innerHTML, true);" + mapId
        + ".popup.setBackgroundColor('white');" + mapId
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

   */
  public MapWithMarkersPage(final PageParameters parameters) {

    OpenLayersMap openLayersMap = new OpenLayersMap("map", true);

    Marker marker = new Marker(new LonLat(50, 50));
    openLayersMap.addOverlay(marker);

    marker = new Marker(new LonLat(100, 50));
    openLayersMap.addOverlay(marker);

    add(openLayersMap);
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

    //optionsLayer.put("type", "G_HYBRID_MAP");
    Layer layer = new GMap("GMap",
        GMAPS_KEY,"2", optionsLayer);
    layers.add(layer);
    HashMap<String, String> mapOptions = new HashMap<String, String>();
    Bounds boundsExtend = new Bounds(new LonLat(12.91, 55.52),
        new LonLat(13.29, 55.73));
    mapOptions.put("maxExtent", boundsExtend.getJSconstructor());
    OpenLayersMap map = new OpenLayersMap("map", true, layers, mapOptions);
    map.setCenter(new LonLat(10.2, 48.9), 13);
    add(map);
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

  public MapWithDrawLayerAndInteractionPage(final PageParameters parameters) {

    OpenLayersMap openLayersMap = new OpenLayersMap("map", true);
    add(openLayersMap);

    final Marker marker = new Marker(new LonLat(50, 50), new PopupPanel(
        "Hello Marker 1"));
    openLayersMap.addOverlay(marker);

    openLayersMap.add(new DrawListenerBehavior() {
      @Override
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.