Search in sources :

Example 1 with Size

use of org.gwtopenmaps.openlayers.client.Size in project opennms by OpenNMS.

the class OpenLayersMapPanel method showLocationDetails.

/**
 * {@inheritDoc}
 */
@Override
public void showLocationDetails(String name, String htmlTitle, String htmlContent) {
    final Marker marker = getMarker(name);
    if (marker != null) {
        m_map.setCenter(marker.getLonLat());
        final VerticalPanel panel = new VerticalPanel();
        panel.add(new Label(htmlTitle));
        panel.add(new HTML(htmlContent));
        Popup p = new Popup(name, marker.getLonLat(), new Size(300, 300), panel.toString(), true);
        // p.setAutoSize(true);
        p.getJSObject().setProperty("autoSize", true);
        m_map.addPopupExclusive(p);
    }
}
Also used : VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) Size(org.gwtopenmaps.openlayers.client.Size) Popup(org.gwtopenmaps.openlayers.client.popup.Popup) Label(com.google.gwt.user.client.ui.Label) HTML(com.google.gwt.user.client.ui.HTML) Marker(org.gwtopenmaps.openlayers.client.Marker)

Aggregations

HTML (com.google.gwt.user.client.ui.HTML)1 Label (com.google.gwt.user.client.ui.Label)1 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)1 Marker (org.gwtopenmaps.openlayers.client.Marker)1 Size (org.gwtopenmaps.openlayers.client.Size)1 Popup (org.gwtopenmaps.openlayers.client.popup.Popup)1