use of com.google.gwt.maps.client.overlay.Icon in project opennms by OpenNMS.
the class GoogleMapsPanel method createMarker.
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);
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;
}
Aggregations