List of usage examples for com.google.gwt.maps.client.overlay MarkerOptions setAutoPan
public final native void setAutoPan(boolean autoPan) ;
From source file:org.opennms.features.poller.remote.gwt.client.GoogleMapsPanel.java
License:Open Source License
private Marker createMarker(final GWTMarkerState marker) { final Icon icon = Icon.newInstance(); icon.setIconSize(Size.newInstance(32, 32)); icon.setIconAnchor(Point.newInstance(16, 32)); String markerImageURL = marker.getImageURL(); icon.setImageURL(markerImageURL);/*from w w w. j a v a 2 s. c om*/ final MarkerOptions markerOptions = MarkerOptions.newInstance(); markerOptions.setAutoPan(true); markerOptions.setClickable(true); markerOptions.setTitle(marker.getName()); markerOptions.setIcon(icon); Marker m = new Marker(toLatLng(marker.getLatLng()), markerOptions); m.setVisible(marker.isVisible()); m.addMarkerClickHandler(new DefaultMarkerClickHandler(marker)); return m; }