From 06cbeb2f110959aabdb25cc537445902d3f4c55a Mon Sep 17 00:00:00 2001 From: euzuro Date: Wed, 24 May 2006 18:45:50 +0000 Subject: [PATCH] fix for #60 conversions to/from lonlat/px need to take into account the offset of the layersContainerDiv. I have introduced the following functions for converting between layer and screen pixel values: getLayerPxFromScreenPx() and getScreenPxFromLayerPx() they are pretty self-explanitory. I then renamed: getPixelFromLonLat() and getLonLatFromPixel() to: getScreenPxFromLonLat() and getLonLatFroScreenmPx() and added: getLayerPxFromLonLat() and getLonLatFromLayerPx() updates were made throughout the code, demos, and tests so everything should still run smoothly. -e- git-svn-id: http://svn.openlayers.org/trunk/openlayers@329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/markerss.html | 23 ++++++-- lib/OpenLayers/Control/MouseDefaults.js | 8 +-- lib/OpenLayers/Layer/Markers.js | 2 +- lib/OpenLayers/Map.js | 73 ++++++++++++++++++++++--- tests/test_Map.html | 8 +-- 5 files changed, 93 insertions(+), 21 deletions(-) diff --git a/examples/markerss.html b/examples/markerss.html index 1f997d5ae8..71cbbb63a2 100644 --- a/examples/markerss.html +++ b/examples/markerss.html @@ -8,7 +8,7 @@ border: 1px solid black; } - +