Package org.wicketstuff.gmap.api

Examples of org.wicketstuff.gmap.api.GLatLng


        map.setPanControlEnabled(true);
        map.setDoubleClickZoomEnabled(true);

        // centre the map on the first object that has a location.
        for (ObjectAdapter adapter : adapterList) {
            GLatLng latLng = asGLatLng((Locatable)adapterList.get(0).getObject());
            if(latLng != null) {
                map.setCenter(latLng);
                break;
            }
        }
View Full Code Here


        final ResourceReference imageResource = determineImageResource(adapter);
        final String urlFor = (String)urlFor(imageResource, new PageParameters());
        @SuppressWarnings("unused")
        final GIcon gicon = new GIcon(urlFor);
       
        GLatLng gLatLng = asGLatLng(locatable);
        if(gLatLng == null) {
            return null;
        }
        final GMarkerOptions markerOptions = new GMarkerOptions(
                map, gLatLng,
View Full Code Here

        return markerOptions;
    }

    private GLatLng asGLatLng(Locatable locatable) {
        final Location location = locatable.getLocation();
        return location!=null?new GLatLng(location.getLatitude(), location.getLongitude()):null;
    }
View Full Code Here

        map.setPanControlEnabled(true);
        map.setDoubleClickZoomEnabled(true);

        // centre the map on the first object that has a location.
        for (ObjectAdapter adapter : adapterList) {
            GLatLng latLng = asGLatLng((Locatable)adapterList.get(0).getObject());
            if(latLng != null) {
                map.setCenter(latLng);
                break;
            }
        }
View Full Code Here

        final ResourceReference imageResource = determineImageResource(adapter);
        final String urlFor = (String)urlFor(imageResource, new PageParameters());
        @SuppressWarnings("unused")
        final GIcon gicon = new GIcon(urlFor);
       
        GLatLng gLatLng = asGLatLng(locatable);
        if(gLatLng == null) {
            return null;
        }
        final GMarkerOptions markerOptions = new GMarkerOptions(
                map, gLatLng,
View Full Code Here

        return markerOptions;
    }

    private GLatLng asGLatLng(Locatable locatable) {
        final Location location = locatable.getLocation();
        return location!=null?new GLatLng(location.getLatitude(), location.getLongitude()):null;
    }
View Full Code Here

    private final GMap map;

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

             * @see org.apache.wicket.ajax.AjaxEventBehavior#onEvent(org.apache.wicket.ajax.AjaxRequestTarget)
             */
            @Override
            protected void onEvent(AjaxRequestTarget target)
            {
                GInfoWindow tmpInfoWindow = new GInfoWindow(new GLatLng(37.5 * (0.9995 + Math.random() / 1000), -122.1 * (0.9995 + Math.random() / 1000)), "Opened via button");
                map.addOverlay(tmpInfoWindow);
                // IMPORTANT: you must have the InfoWindow already added to the map
                // before you can add any listeners
                GEventHandler closeClickHandler = new GEventHandler()
                {
View Full Code Here

        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

    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

TOP

Related Classes of org.wicketstuff.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.