Examples of GInfoWindow


Examples of org.wicketstuff.gmap.api.GInfoWindow

                {
                    if (infoWindow != null)
                    {
                        infoWindow.close();
                    }
                    infoWindow = new GInfoWindow(gLatLng, "Test <br/>" + i++);
                    map.addOverlay(infoWindow);
                    feedback.info("InfoWindow " + infoWindow.getId() + " was added");
                    target.add(feedback);

                    // IMPORTANT: you must have the InfoWindow already added to the map
                    // before you can add any listeners
                    infoWindow.addListener(GEvent.closeclick, closeClickHandler);


                }
            }
        });

        add(map);

        lbInfoWindow = new Label("infoWindow", "openInfoWindow");
        lbInfoWindow.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)
            {
                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()
                {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public void onEvent(AjaxRequestTarget target)
                    {
                        feedback.info("InfoWindow which was opened via a button was closed");
                        target.add(feedback);
                    }
                };
                tmpInfoWindow.addListener(GEvent.closeclick, closeClickHandler);
                feedback.info("InfoWindow was opened via button");
                target.add(feedback);
            }
        });
        add(lbInfoWindow);
View Full Code Here

Examples of org.wicketstuff.gmap.api.GInfoWindow

            @Override
            public void onGeoCode(AjaxRequestTarget target, GeocoderStatus status, String address, GLatLng latLng)
            {
                if (status == GeocoderStatus.OK)
                {
                    bottomMap.addOverlay(new GInfoWindow(latLng, "address: " + address));
                    target.add(feedback);
                }
                else
                {
                    error("Unable to geocode (" + status + ")");
                    target.add(feedback);
                }
            }
        });
        geocodeForm.add(button);

        // Using ServerGeocoder the geocoding request
        // is performed on the server using Googles HTTP interface.
        // http://www.google.com/apis/maps/documentation/services.html#Geocoding_Direct
        geocodeForm.add(new AjaxButton("server", geocodeForm)
        {
            private static final long serialVersionUID = 1L;

            @Override
            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)
                {
                    error("Unable to geocode (" + e.getMessage() + ")");
View Full Code Here

Examples of org.wicketstuff.gmap.api.GInfoWindow

                    c.setOutputMarkupId(true);
                   
                    //Add or replace it on the hiddenContainer
                    hiddenContainersInfoPanel.addOrReplace(c);
                   
                    infoWindow = new GInfoWindow(gLatLng, c);
                    map.addOverlay(infoWindow);
                    feedback.info("InfoWindow " + infoWindow.getId() + " was added");
                    target.add(feedback);
                   
                    //add the hiddenContainer to be repainted
                    target.add(hiddenContainersInfoPanel);
                    // IMPORTANT: you must have the InfoWindow already added to the map
                    // before you can add any listeners
                    infoWindow.addListener(GEvent.closeclick, closeClickHandler);


                }
            }
        });

        add(map);

        lbInfoWindow = new Label("infoWindow", "openInfoWindow");
        lbInfoWindow.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)
            {
                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()
                {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public void onEvent(AjaxRequestTarget target)
                    {
                        feedback.info("InfoWindow which was opened via a button was closed");
                        target.add(feedback);
                    }
                };
                tmpInfoWindow.addListener(GEvent.closeclick, closeClickHandler);
                feedback.info("InfoWindow was opened via button");
                target.add(feedback);
            }
        });
        add(lbInfoWindow);
View Full Code Here

Examples of wicket.contrib.gmap.api.GInfoWindow

  {
    super(id);

    add(headerContrib);

    infoWindow = new GInfoWindow();
    add(infoWindow);

    map = new WebMarkupContainer("map");
    map.setOutputMarkupId(true);
    add(map);
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.