[OpenLayers-Dev] Padding and getPixelFromLonLat

Denis Rykov rykovd at gmail.com
Sun Jul 24 04:07:58 EDT 2011


Hi devs!
Try to add custom tooltips on my map and for calculating tooltip's
place use getPixelFromLonLat() function.
All works fine, but I need define the space between the body border
and the map div. For this I'm using "padding" property of "body" tag.
After applying this css style my tooltips is placed in wrong places.
It looks like padding not affected to getPixelFromLonLat() function.
What is the right way for calculating pixel coordinates in this case?


More information about the Dev mailing list