Package com.google.gwt.maps.client

Examples of com.google.gwt.maps.client.InfoWindow$VirtualPanel


        }

        final Marker marker = new Marker(point);
        marker.addMarkerClickListener(new MarkerClickListener() {
            public void onClick(Marker sender) {
                InfoWindow info = map.getInfoWindow();
                info.open(sender, new InfoWindowContent(new SchoolLink(
                        school)));
            }

            public void onDoubleClick(Marker sender) {
            }
View Full Code Here


  private Marker createMarker(LatLng point, final int number) {
    final Marker marker = new Marker(point);
   
    marker.addMarkerClickHandler(new MarkerClickHandler() {
      public void onClick(MarkerClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        info.open(marker,
            new InfoWindowContent("Marker #<b>" + number + "</b>"));
      }
    });
   
    return marker;
View Full Code Here

    vp.add(hp);

    final Button infoWindowButton = new Button("Show InfoWindow");
    infoWindowButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        InfoWindowContent content = new InfoWindowContent("Hello Maps!");
        content.setMaxContent("Hello Maps - more content");
        content.setMaxTitle("Hello Maps");
        info.open(map.getCenter(), content);
      }
    });
    hp.add(infoWindowButton);

    final Button mInfoWindowButton = new Button("Marker InfoWindow");
    mInfoWindowButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        InfoWindowContent content = new InfoWindowContent("Hello Maps!");
        content.setMaxContent("Hello Maps - more content");
        content.setMaxTitle("Hello Maps");
        info.open(marker, content);
      }
    });
    hp.add(mInfoWindowButton);

    final Button mapTypeButton = new Button("Add Map Type");
View Full Code Here

        map.setSize("300px", "300px");
        final Marker m = new Marker(center);
        map.addOverlay(m);
        RootPanel.get().add(map);
        InfoWindowContent content = new InfoWindowContent("<i>Hello World!</i>");
        InfoWindow info = map.getInfoWindow();
        info.open(m, content);
        DeferredCommand.addCommand(new Command() {

          public void execute() {
            m.closeInfoWindow();
            finishTest();
View Full Code Here

    final Marker marker = new Marker(point, options);

    marker.addMarkerClickHandler(new MarkerClickHandler() {

      public void onClick(MarkerClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        info.open(event.getSender(), new InfoWindowContent("Marker <b>"
            + letter + "</b>"));
      }

    });
View Full Code Here

    latLabel.setText(fmt.format(point.getLatitude()));
    lngLabel.setText(fmt.format(point.getLongitude()));
  }

  private void showAddress(final String address) {
    final InfoWindow info = map.getInfoWindow();
    geocoder.getLatLng(address, new LatLngCallback() {
      public void onFailure() {
        Window.alert(address + " not found");
      }

      public void onSuccess(LatLng point) {
        map.setCenter(point, 13);
        Marker marker = new Marker(point);
        map.addOverlay(marker);
        info.open(marker, new InfoWindowContent(address));
        displayLatLng(point);
      }
    });
  }
View Full Code Here

    map.clearOverlays();

    MarkerOptions options = MarkerOptions.newInstance();
    options.setDraggable(true);
    final Marker marker = new Marker(map.getCenter(), options);
    final InfoWindow info = map.getInfoWindow();
   
    marker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
      public void onDragEnd(MarkerDragEndEvent event) {
          info.open(marker, new InfoWindowContent("Just bouncing along..."));
        }
     
    });
   
    marker.addMarkerDragStartHandler(new MarkerDragStartHandler() {
      public void onDragStart(MarkerDragStartEvent event) {
        info.setVisible(false);
      }
    });
   
    map.addOverlay(marker);
  }
View Full Code Here

    initWidget(panel);
    geocoder = new Geocoder();
  }

  private void showAddress(final String address) {
    final InfoWindow info = map.getInfoWindow();
    geocoder.getLocations(address, new LocationCallback() {
      public void onFailure(int statusCode) {
        Window.alert("Sorry, we were unable to geocode that address");
      }

      public void onSuccess(JsArray<Placemark> locations) {
        Placemark place = locations.get(0);
        Marker marker = new Marker(place.getPoint());
        map.addOverlay(marker);
        String message = place.getAddress() + "<br>" + "<b>Country code:</b> "
            + place.getCountry();
        info.open(marker, new InfoWindowContent(message));
      }
    });
  }
View Full Code Here

              MarkerInfoWindowBeforeCloseEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }
        });
        final InfoWindow info = map.getInfoWindow();
        map.addInfoWindowOpenHandler(new MapInfoWindowOpenHandler() {

          public void onInfoWindowOpen(MapInfoWindowOpenEvent event) {
            DeferredCommand.addCommand(new Command() {
              public void execute() {
                info.close();
              }
            });
          }
        });

        map.addOverlay(marker);
        info.open(marker, new InfoWindowContent("Hello World!"));
      }
    }, false);
  }
View Full Code Here

          public void onInfoWindowClose(MarkerInfoWindowCloseEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }
        });
        final InfoWindow info = map.getInfoWindow();
        map.addInfoWindowOpenHandler(new MapInfoWindowOpenHandler() {

          public void onInfoWindowOpen(MapInfoWindowOpenEvent event) {
            DeferredCommand.addCommand(new Command() {
              public void execute() {
                info.close();
              }
            });
          }
        });
        info.open(marker, new InfoWindowContent("Hello World!"));
      }
    }, false);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.InfoWindow$VirtualPanel

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.