[OpenLayers-Users] bug with getLonLatFromViewPortPx?
Christopher Schmidt
crschmidt at metacarta.com
Wed Dec 13 10:43:40 EST 2006
On Wed, Dec 13, 2006 at 07:21:30AM -0800, Curtis W. Ruck wrote:
> I have a raster image that happens to have my latitude/longitude lines drawn on it. My wms server is returning a portion of this image to OpenLayers. I added an event by "map.events.register('mousedown',map,queryLayer)" where queryLayer is a function: "function queryLayer(evt)"
>
> Somehow the getLonLatFromViewPortPx is returning invalid coordinates, shifted 5 pixels to the right.
>
> I also tried MousePosition() and it is off the same amount.
>
> I am running OpenLayers-2.2 release.
Can you give a page that demonstrates this problem? Is it possible that
your map is anchored to the right, and the page then adds a scrollbar?
currently, map events do not take into account the resizing of a page,
so it's possible that by the scrollbar being added, the offset of 5px is
added, but it would be hard to see without a test case.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list