List of usage examples for com.google.gwt.maps.client.overlays InfoWindow setPosition
public final native void setPosition(LatLng position) ;
From source file:com.google.gwt.maps.testing.client.maps.ElevationMapWidget.java
License:Apache License
protected void drawInfoWindow(LatLng position, double elevation) { NumberFormat format = NumberFormat.getFormat("###"); String elevationStr = format.format(elevation); String latlngStr = "[ " + format.format(position.getLatitude()) + ", " + format.format(position.getLongitude()) + " ]"; String message = "Elevation " + elevationStr + "m @ " + latlngStr; HTML html = new HTML(message); InfoWindowOptions options = InfoWindowOptions.newInstance(); options.setContent(html);//from www . java 2 s . com InfoWindow iw = InfoWindow.newInstance(options); iw.setPosition(position); iw.open(mapWidget); }