use of com.google.gwt.maps.client.InfoWindowContent in project opennms by OpenNMS.
the class GoogleMapsPanel method showLocationDetails.
/** {@inheritDoc} */
@Override
public void showLocationDetails(final String name, final String htmlTitle, final String htmlContent) {
final Marker m = m_markers.get(name);
getMapWidget().savePosition();
getMapWidget().setCenter(m.getLatLng());
if (m != null) {
final VerticalPanel panel = new VerticalPanel();
panel.add(new Label(htmlTitle));
panel.add(new HTML(htmlContent));
getMapWidget().getInfoWindow().open(m.getLatLng(), new InfoWindowContent(panel.toString()));
getMapWidget().getInfoWindow().addInfoWindowCloseClickHandler(new InfoWindowCloseClickHandler() {
@Override
public void onCloseClick(InfoWindowCloseClickEvent event) {
getMapWidget().returnToSavedPosition();
}
});
}
}
Aggregations