List of usage examples for com.google.gwt.maps.client.overlays InfoWindowOptions setDisableAutoPan
public final native void setDisableAutoPan(boolean disableAutoPan) ;
From source file:gov.nist.spectrumbrowser.client.SensorGroupMarker.java
License:Open Source License
public InfoWindow getInfoWindow(String message) { if (infoWindow == null) { LatLng northeast = SpectrumBrowserShowDatasets.getMap().getBounds().getNorthEast(); LatLng southwest = SpectrumBrowserShowDatasets.getMap().getBounds().getSouthWest(); double delta = northeast.getLatitude() - southwest.getLatitude(); int height = SpectrumBrowser.MAP_HEIGHT; // should be the height of the icon. int desiredPixelOffset = 15; double latitudeOffset = delta / height * desiredPixelOffset; InfoWindowOptions iwo = InfoWindowOptions.newInstance(); iwo.setPosition(LatLng.newInstance(lat + latitudeOffset, lon)); iwo.setDisableAutoPan(true); iwo.setContent(message);/*w w w.j av a2 s . c om*/ infoWindow = InfoWindow.newInstance(iwo); } return infoWindow; }
From source file:gov.nist.spectrumbrowser.client.SensorInfoDisplay.java
License:Open Source License
public InfoWindow getInfoWindow() { LatLng northeast = SpectrumBrowserShowDatasets.getMap().getBounds().getNorthEast(); LatLng southwest = SpectrumBrowserShowDatasets.getMap().getBounds().getSouthWest(); double delta = northeast.getLatitude() - southwest.getLatitude(); int height = SpectrumBrowser.MAP_HEIGHT; // should be the height of the icon. int desiredPixelOffset = 15; double latitudeOffset = delta / height * desiredPixelOffset; InfoWindowOptions iwo = InfoWindowOptions.newInstance(); iwo.setPosition(LatLng.newInstance(getLatLng().getLatitude() + latitudeOffset, getLatLng().getLongitude())); iwo.setDisableAutoPan(true); iwo.setContent(sensorInfo.getSensorDescription()); return InfoWindow.newInstance(iwo); }