Examples of GLatLng


Examples of org.wicketstuff.gmap.api.GLatLng

        add(map);
       
        List<GLatLng> markersToShow = new ArrayList<GLatLng>();
       
        // add some markers
        GLatLng glatlng1 = new GLatLng(47.4915285, 8.2050407);
        GMarkerOptions opts1 = new GMarkerOptions(map, glatlng1);
        GMarker marker1 = new GMarker("marker1", opts1);
        map.addOverlay(marker1);
       
        GLatLng glatlng2 = new GLatLng(50.7706934, 2.2164129);
        GMarkerOptions opts2 = new GMarkerOptions(map, glatlng2);
        GMarker marker2 = new GMarker("marker2", opts2);
        map.addOverlay(marker2);
       
        GLatLng glatlng3 = new GLatLng(48.858859, 2.34706);
        GMarkerOptions opts3 = new GMarkerOptions(map, glatlng3);
        GMarker marker3 = new GMarker("marker3", opts3);
        map.addOverlay(marker3);
       
        // add them to the list of coordinates that we need in our viewport
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    super(id);
    GMap map = new GMap("map");
    map.setStreetViewControlEnabled(false);
    map.setScaleControlEnabled(true);
    map.setScrollWheelZoomEnabled(true);
    map.setCenter(new GLatLng(52.47649, 13.228573));       
    add(map);
  }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    private static final long serialVersionUID = 1L;

    public CustomPointPage()
    {
        GMap map = new GMap("map");
        map.setCenter(new GLatLng(52.37649, 4.888573));
        add(map);

        GIcon icon =
                new GIcon("/pin.gif").setScaledSize(
                new GSize(64, 64)).setSize(new GSize(64, 64));
        GIcon shadow =
                new GIcon("/shadow.png").setScaledSize(
                new GSize(64, 64)).setSize(new GSize(64, 64));
        GOverlay marker = new GMarker(new GMarkerOptions(map, new GLatLng(52.37649, 4.888573), "My Title", icon, shadow));

        map.addOverlay(marker);
    }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    @Override
    protected final void onEvent(AjaxRequestTarget target)
    {
        Request request = RequestCycle.get().getRequest();
        NumberFormat fmt = DecimalFormat.getInstance(Locale.US);
        GLatLng latLng = null;
        String latStr = request.getRequestParameters().getParameterValue("lat").toString();
        String lngStr = request.getRequestParameters().getParameterValue("lng").toString();
        Double lat = null;
        Double lng = null;
        try
        {
          lat = fmt.parse(latStr).doubleValue();
          lng = fmt.parse(lngStr).doubleValue();
        } catch (ParseException e)
        {
          throw new StringValueConversionException("Unable to convert 'lat/lng' to a double value", e);
        }
        latLng = new GLatLng(lat, lng);

        onDblClick(target, latLng);
    }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    @Override
    protected void onEvent(AjaxRequestTarget target)
    {
        Request request = RequestCycle.get().getRequest();
        NumberFormat fmt = DecimalFormat.getInstance(Locale.US);
        GLatLng latLng = null;

        String latStr = request.getRequestParameters().getParameterValue("lat").toString();
        String lngStr = request.getRequestParameters().getParameterValue("lng").toString();
        Double lat = null;
        Double lng = null;
        try
        {
          lat = fmt.parse(latStr).doubleValue();
          lng = fmt.parse(lngStr).doubleValue();
        } catch (ParseException e)
        {
          throw new StringValueConversionException("Unable to convert 'lat/lng' to a double value", e);
        }
        latLng = new GLatLng(lat, lng);

        onClick(target, latLng);
    }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    @Test
    public void testGeocoding() throws Exception {
        System.out.println("geocoding");
        Geocoder coder = new Geocoder();
        GLatLng result = coder.geocode("Salzburgerstraße 205, 4030 Linz, Österreich");
        Assert.assertNotNull(result);
        Assert.assertEquals(48.25763170, result.getLat(), 0.00001);
        Assert.assertEquals(14.29231840, result.getLng(), 0.00001);
    }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    private static final long serialVersionUID = 1L;

    public PolygonesPage()
    {
        GMap map = new GMap("topPanel");
        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

Examples of org.wicketstuff.gmap.api.GLatLng

    {
        GMap map = new GMap("map");
        map.setStreetViewControlEnabled(false);
        map.setScaleControlEnabled(true);
        map.setScrollWheelZoomEnabled(true);
        map.setCenter(new GLatLng(52.47649, 13.228573));       
        add(map);
    }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    final FeedbackPanel feedback = new FeedbackPanel("feedback");
    add(feedback);
    feedback.setOutputMarkupId(true);

    GMap map = new GMap("topPanel");
    GRectangle rectangle = new GRectangle(new GLatLngBounds(new GLatLng(37.35, -121.9), new GLatLng(37.45, -121.8)), "#000000", 4, 0.7f, "#E9601A", 0.7f);
    rectangle.setEditable(true);
    rectangle.setDraggable(true);
    GEventHandler eventHandler = new GEventHandler()
    {
      @Override
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

        for(int i=0; i<1000; i++)
        {
            double latitude = minLat + (double)(Math.random() * ((maxLat - minLat) + 1));
            double longitude = minLon + (double)(Math.random() * ((maxLon - minLon) + 1));
         
            GLatLng glatlng = new GLatLng(latitude, longitude);
            markersToShow.add(glatlng);
           
            map.addOverlay(new GMarker("marker"+i, new GMarkerOptions(map, glatlng)));
            mapDefault.addOverlay(new GMarker("marker"+i, new GMarkerOptions(mapDefault, glatlng)));
        }
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.