[OpenLayers-Users] IE registers click postion with an offset to
the left
Christopher Schmidt
crschmidt at metacarta.com
Mon Mar 9 08:14:31 EDT 2009
On Mon, Mar 09, 2009 at 10:00:41AM +0100, Nico Mandery wrote:
> Hello list,
>
> I am using a clickhandler to recieve events when a user clicks at some
> point in the map. Inside the registered callback I use the method
> getLonLatFromViewPortPx of the map to get the coordinates from the
> pixel-coordinates associated with the event (Event.xy).
>
> This works great in Firefox, but when testing with IE I noticed an
> pretty big offset to the left of the recieved position. Firefox for
> example registers the correct value of X=290 pixels, but with IE its
> -820 pixels. The Y-position is the same with both browsers.
>
> The map is located inside some nested divs, may that cause the problem?
> There are also some "float:left" CSS attributes on a few of the outer DIVs.
The only way to hellp debug this is by sharing your HTML code,
preferably with as little code as possibe. (See
http://trac.openlayers.org/wiki/GettingHelp#TipsforgettingHelp)
-- Chris
> thanks a lot,
> nico
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list