Package wicket.contrib.gmap.api

Examples of wicket.contrib.gmap.api.GLatLng


    String basePath = settings.getImageDirectoryRoot().getAbsolutePath();
    for (Folder current : folders){
     
      Sequence sequence = ImageUtils.readSequence(current.getFile());
      if (sequence != null && sequence.getLatitude() != 0 && sequence.getLongitude() != 0){
        GMarker wicketLibrary = new GMarker(new GLatLng(sequence.getLatitude(), sequence.getLongitude()));
     
            //new EmptyPanel("gmarkerInfo"));//("gmarkerInfo", sequence, current));
//            new DescriptionPanel("gmarkerInfo", current.getFile().getAbsolutePath().substring(settings.getImageDirectoryRoot().getAbsolutePath().length(), current.getFile().getAbsolutePath().length())));
            gmap.addOverlay(wicketLibrary);
      }
View Full Code Here


        markerSelected(target, marker);
      }
    });
    topMap.setZoom(10);
    GMarkerOptions options = new GMarkerOptions("Home").draggable(true).autoPan(true);
    topMap.addOverlay(new GMarker(new GLatLng(37.4, -122.1), options));
    topMap.addControl(GControl.GLargeMapControl);
    topMap.addControl(GControl.GMapTypeControl);
    add(topMap);

    final IModel<GMarker> markerModel = new Model<GMarker>(null);
    markerLabel = new Label("markerLabel", markerModel);
    markerLabel.add(new AjaxEventBehavior("onclick")
    {
      private static final long serialVersionUID = 1L;

      /**
       * @see org.apache.wicket.ajax.AjaxEventBehavior#onEvent(org.apache.wicket.ajax.AjaxRequestTarget)
       */
      @Override
      protected void onEvent(AjaxRequestTarget target)
      {
        GMarker marker = markerModel.getObject();
        if (marker != null)
        {
          GLatLng point = marker.getLatLng();

          GMarker random = new GMarker(new GLatLng(point.getLat()
              * (0.9995 + Math.random() / 1000), point.getLng()
              * (0.9995 + Math.random() / 1000)));

          topMap.addOverlay(random);
        }
      }
View Full Code Here

  public RefreshPointPage()
  {
    map = new GMap2("map", GMapExampleApplication.get().getGoogleMapsAPIkey());
    add(map);

    GOverlay overlay = createOverlay("Amsterdam", new GLatLng(52.37649, 4.888573), "image.gif",
        "shadow.png");

    map.addOverlay(overlay);

    map.add(new GMapAutoUpdatingBehavior(Duration.seconds(5))
    {
      private static final long serialVersionUID = 1L;

      private int i = 1;

      @Override
      protected void onTimer(AjaxRequestTarget target, GMap2 map)
      {
        GOverlay overlay;
        if (i % 3 == 0)
        {
          overlay = createOverlay("Amsterdam", new GLatLng(52.37649, 4.888573),
              "image.gif", "shadow.png");
          i = 0;
        }
        else if (i % 3 == 1)
        {
          overlay = createOverlay("Amsterdam", new GLatLng(52.37649, 4.888573),
              "image2.gif", "shadow2.png");
        }
        else
        {
          overlay = createOverlay("Toulouse", new GLatLng(43.604363, 1.442951),
              "image2.gif", "shadow2.png");
        }
        i++;
        map.setOverlays(Collections.singletonList(overlay));
      }
View Full Code Here

  private final GMap2 map;

  public GGroundOverlayPage()
  {
    map = new GMap2 ("map", GMapExampleApplication.get().getGoogleMapsAPIkey());
    map.setCenter(new GLatLng(40.740, -74.18));
    map.setZoom(12);

    // ground overlay

    GLatLngBounds boundaries = new GLatLngBounds(new GLatLng(40.716216, -74.213393),
        new GLatLng(40.765641, -74.139235));
    GGroundOverlay oldmap = new GGroundOverlay(
        "http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg", boundaries);
    map.addOverlay(oldmap);
    add(map);
  }
View Full Code Here

  public PolygonesPage()
  {
    GMap2 map = new GMap2("topPanel", GMapExampleApplication.get()
        .getGoogleMapsAPIkey());
    map.addOverlay(new GPolygon("#000000", 4, 0.7f, "#E9601A", 0.7f, new GLatLng(37.3, -122.4),
        new GLatLng(37.2, -122.2), new GLatLng(37.3, -122.0), new GLatLng(37.4, -122.2),
        new GLatLng(37.3, -122.4)));
    map.addOverlay(new GPolyline("#FFFFFF", 8, 1.0f, new GLatLng(37.35, -122.3), new GLatLng(
        37.25, -122.25), new GLatLng(37.3, -122.2), new GLatLng(37.25, -122.15),
        new GLatLng(37.35, -122.1)));
    map.setZoom(10);
    add(map);
  }
View Full Code Here

   */
  @Ignore
  @Test
  public void testGeocoding() throws IOException {
    Geocoder coder = new Geocoder("ABQIAAAADk60rPazQzTdmKT7CvyKXRQEr9A52YiMqcOFyKYFGBLG6IXC6RQpL6leG0_YYqR-KhNEFosZSJieGQ");
    GLatLng result = coder.geocode("Salzburgerstra�e 205, 4030 Linz, �sterreich");
    Assert.assertNotNull(result);
  }
View Full Code Here

    if (Integer.parseInt(status) != GeocoderException.G_GEO_SUCCESS) {
      throw new GeocoderException(Integer.parseInt(status));
    }

    return new GLatLng(Double.parseDouble(latitude), Double.parseDouble(longitude));
  }
View Full Code Here

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

    GLatLng latLng = null;

    String latLngParameter = request.getRequestParameters().getParameterValue("argument1").toString();
    if (latLngParameter != null) {
      latLng = GLatLng.parse(latLngParameter);
    }
View Full Code Here

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

    GOverlay overlay = null;
    GLatLng latLng = null;

    String markerParameter = request.getRequestParameters().getParameterValue("argument0").toString();
    if (markerParameter != null) {
      for (GOverlay ovl : getGMap2().getOverlays()) {
        if (ovl.getId().equals(markerParameter)) {
View Full Code Here

  public SimplePage()
  {
    GMap2 map = new GMap2("map", GMapExampleApplication.get()
        .getGoogleMapsAPIkey());
    map.setCenter(new GLatLng(52.37649, 4.888573));
    add(map);
  }
View Full Code Here

TOP

Related Classes of wicket.contrib.gmap.api.GLatLng

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.