Reputation: 2300
Is it possible to get position inside the OpenLayers container from a lat/long point?
Google Maps has something like this:
var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
Can I do the same thing in OpenLayers?
Upvotes: 0
Views: 754
Reputation: 2376
See the getPixelFromLonLat
[1] method from map object.
1 - http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.getPixelFromLonLat
Upvotes: 1