[OpenLayers-Users] Mouse coordinates in movable map

Greg Ederer greg at ergonosis.com
Sun Oct 12 16:26:12 EDT 2008


Hi,

This is an interesting problem (at least, I think so).

I have placed a map inside a movable element (using dojo.dnd.Moveable) 
so that users can drag it around the browser window by grabbing a 
titlebar.  (My goal is to let the user create multiple map panes, and 
drag them around the window.)

The trouble is that when the user moves the map, and then clicks on it, 
the mouse coordinates get processed as though the map were still in its 
initial location (where it was when the page first loaded.)

For example, if the user moves the map twenty pixels to the right, and 
then clicks on it, the click is interpreted as if the the user clicked 
on whatever is twenty pixels to the right of where she clicked.

Is there some way to update the offsets of the map mouse origin when the 
user drags the map?

Thanks!

Greg

-- 
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| greg at ergonosis.com
| 360.774.6848
|




More information about the Users mailing list