List of usage examples for com.google.gwt.maps.client.overlays InfoWindow open
private final native void open(StreetViewPanoramaImpl impl, MVCObject<?> anchor) ;
From source file:com.google.gwt.maps.testing.client.maps.BasicMapWidget.java
License:Apache License
protected void drawInfoWindow(Marker marker, MouseEvent mouseEvent) { if (marker == null || mouseEvent == null) { return;//from ww w . jav a 2s. c o m } HTML html = new HTML("You clicked on: " + mouseEvent.getLatLng().getToString()); InfoWindowOptions options = InfoWindowOptions.newInstance(); options.setContent(html); InfoWindow iw = InfoWindow.newInstance(options); iw.open(mapWidget, marker); }
From source file:com.google.gwt.maps.testing.client.maps.InfoWindowMapWidget.java
License:Apache License
protected void drawInfoWindow(final Marker marker, MouseEvent mouseEvent) { if (marker == null || mouseEvent == null) { return;/* ww w. ja v a 2 s . c om*/ } HTML html = new HTML( "Why did you click on me? <br/> You clicked on: " + mouseEvent.getLatLng().getToString()); Button b1 = new Button("b1"); b1.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { Window.alert("b1 clicked"); } }); Button b2 = new Button("b2"); b2.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { Window.alert("b2 clicked"); } }); VerticalPanel vp = new VerticalPanel(); vp.add(html); vp.add(b1); vp.add(b2); InfoWindowOptions options = InfoWindowOptions.newInstance(); options.setContent(vp); InfoWindow iw = InfoWindow.newInstance(options); iw.open(mapWidget, marker); // If you want to clear widgets, Use options.clear() to remove the widgets // from map // options.clear(); }
From source file:com.google.sampling.experiential.client.ChartPanel.java
License:Open Source License
private void openInfoWindowForMarker(final EventDAO eventRating, final Marker marker) { InfoWindowOptions options = InfoWindowOptions.newInstance(); options.setContent(createInfoWindowForEvent(eventRating)); InfoWindow iw = InfoWindow.newInstance(options); iw.open(map, marker); }