Examples of LonLat


Examples of org.wicketstuff.openlayers.api.LonLat

   */
  public MapWithMarkersAndPopupsPage(final PageParameters parameters) {

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

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

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

    add(openLayersMap);
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

    setZoom(mapCenter.getZoom());
  }

  public void setCenter(Double longitude, Double latitude) {
    if (longitude != null && latitude != null) {
      setCenter(new LonLat(longitude.doubleValue(), latitude
          .doubleValue()));
    }
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

    layers.add(layerOSMMapnik);
    layers.add(layerOSMTilesAtHome);   
    layers.add(layerOSMCycleMap);
   
    HashMap<String, String> mapOptions = new HashMap<String, String>();
    Bounds boundsExtend = new Bounds(new LonLat(-20037508.34, -20037508.34), new LonLat(20037508.34, 20037508.34));   
    mapOptions.put("maxExtent", boundsExtend.getJSconstructor());
    mapOptions.put("projection", "new OpenLayers.Projection('EPSG:900913')");
    mapOptions.put("displayProjection", "new OpenLayers.Projection('EPSG:4326')");
    mapOptions.put("units", "'meters'");
    mapOptions.put("maxResolution", "156543");
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

  public MapWithMarkersAndPopupsInteractionPage(
      final PageParameters parameters) {

    OpenLayersMap openLayersMap = new OpenLayersMap("map", true);
    add(openLayersMap);
    Marker marker = new Marker(new LonLat(50, 50), new PopupPanel(
        "Hello Marker 1"));
    openLayersMap.addOverlay(marker);

    WebMarkupContainer popupClicker = new WebMarkupContainer("openPop1");

    popupClicker.add(new PopupMarkerInfoAttributeAppender("onClick", ";",
        marker, openLayersMap));

    add(popupClicker);

    marker = new Marker(new LonLat(100, 50), new PopupPanel(
        "Hello Marker 2"));
    openLayersMap.addOverlay(marker);
    popupClicker = new WebMarkupContainer("openPop2");

    popupClicker.add(new PopupMarkerInfoAttributeAppender("onClick", ";",
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

    HashMap<String, String> optionsLayer = new HashMap<String, String>();
    // 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(-20037508.34,-20037508.34), new LonLat(20037508.34,20037508.34));
    mapOptions.put("maxExtent", boundsExtend.getJSconstructor());
    OpenLayersMap map = new OpenLayersMap("map", true, layers, mapOptions);
    map.setCenter(new SphericalMercatorLonLat(10.2, 48.9), 13);
    add(map);
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

    layers.add(layerOSMMapnik);
    layers.add(layerOSMTilesAtHome);
    layers.add(layerOSMCycleMap);

    HashMap<String, String> mapOptions = new HashMap<String, String>();
    Bounds boundsExtend = new Bounds(new LonLat(-20037508.34, -20037508.34), new LonLat(
      20037508.34, 20037508.34));
    mapOptions.put("maxExtent", boundsExtend.getJSconstructor());
    mapOptions.put("projection", "new OpenLayers.Projection('EPSG:900913')");
    mapOptions.put("displayProjection", "new OpenLayers.Projection('EPSG:4326')");
    mapOptions.put("units", "'meters'");
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

  public void setCenter(Double longitude, Double latitude)
  {
    if (longitude != null && latitude != null)
    {
      setCenter(new LonLat(longitude.doubleValue(), latitude.doubleValue()));
    }
  }
View Full Code Here

Examples of org.wicketstuff.openlayers.api.LonLat

  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

    // Currently only support clicking on markers!
    getOpenLayerMap().getInfoWindow().getContent().replaceWith(marker.getPopup());
    getOpenLayerMap().getInfoWindow().setContent(marker.getPopup());
    target.add(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 +
      ".map.addPopup(" + mapId + ".popup);";

    // open info window
View Full Code Here

Examples of org.zkoss.openlayers.base.LonLat

        VirtualEarth.Type.HYBRID))));
    map.addLayer(new VirtualEarth("Aerial", toMap(pair("type",
        VirtualEarth.Type.AERIAL))));

    map.addControl(new LayerSwitcher());
    map.setCenter(new LonLat(-110, 45), 3, false, false);

  }
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.