Examples of GLatLng


Examples of org.wicketstuff.gmap.api.GLatLng

            protected void onSubmit(AjaxRequestTarget target, Form<?> form)
            {
                try
                {
                    String address = addressTextField.getDefaultModelObjectAsString();
                    GLatLng latLng = new ServerGeocoder().findAddress(address);
                    bottomMap.addOverlay(new GInfoWindow(latLng, "address: " + address));
                    target.add(feedback);
                }
                catch (Exception e)
                {
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

    public RefreshPointPage()
    {
        map = new GMap("map");
        add(map);

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

        map.addOverlay(overlay);

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

            @Override
            protected void onTimer(AjaxRequestTarget target)
            {
                if (updateOverlays)
                {
                    GOverlay newOverlay;
                    if (i % 3 == 0)
                    {
                        newOverlay = createOverlay("Amsterdam", new GLatLng(52.37649, 4.888573), "pin.gif", "shadow.png");
                        i = 0;
                    }
                    else if (i % 3 == 1)
                    {
                        newOverlay = createOverlay("Amsterdam", new GLatLng(52.37649, 4.888573), "pin2.gif", "shadow2.png");
                    }
                    else
                    {
                        newOverlay = createOverlay("Toulouse", new GLatLng(43.604363, 1.442951), "pin2.gif", "shadow2.png");
                    }
                    i++;
                    map.setOverlays(Collections.singletonList(newOverlay));
                }
            }
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));       
        map.setMinZoom(6);
        map.setMaxZoom(10);
        add(map);
    }
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

        if (status != GeocoderStatus.OK) {
            throw new GeocoderException(status);
        }
        JSONArray results = jsonResponse.getJSONArray("results");
        JSONObject location = results.getJSONObject(0).getJSONObject("geometry").getJSONObject("location");
        return new GLatLng(location.getDouble("lat"), location.getDouble("lng"));
    }
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");
        GCircle circle = new GCircle(new GLatLng(37.35, -121.9), 10000, "#000000", 4, 0.7f, "#E9601A", 0.7f);
        circle.setEditable(true);
        circle.setDraggable(true);
        GEventHandler eventHandler = new GEventHandler() {
            @Override
            public void onEvent(AjaxRequestTarget target) {
View Full Code Here

Examples of org.wicketstuff.gmap.api.GLatLng

             * @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

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

Examples of org.wicketstuff.gmap.api.GLatLng

        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

Examples of org.wicketstuff.gmap.api.GLatLng

        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

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