use of org.gwtopenmaps.openlayers.client.LonLat in project opennms by OpenNMS.
the class OpenLayersMapPanel method toLonLat.
private static LonLat toLonLat(final GWTLatLng latLng) {
final LonLat ll = new LonLat(latLng.getLongitude(), latLng.getLatitude());
ll.transform(PROJECTION_LAT_LON.getProjectionCode(), PROJECTION_SPHERICAL_MERCATOR.getProjectionCode());
return ll;
}
use of org.gwtopenmaps.openlayers.client.LonLat in project opennms by OpenNMS.
the class OpenLayersMapPanel method createMarker.
private Marker createMarker(final GWTMarkerState marker) {
final LonLat lonLat = toLonLat(marker.getLatLng());
final Icon icon = createIcon(marker);
final Marker m = new Marker(lonLat, icon);
m.addBrowserEventListener("click", new DefaultMarkerClickHandler(marker));
return m;
}