[OpenLayers-Users] Dragging a DOM element onto an OpenLayers map

Christopher Schmidt crschmidt at metacarta.com
Wed Jul 30 18:25:19 EDT 2008


On Wed, Jul 30, 2008 at 03:03:13PM -0400, Kevin Marsh wrote:
> Brad,
> 
> Thanks... I started fiddling with jQueruy/UI draggable stuff (which  
> was a lot of fun, seeing as how their doc site is/was down).. and it's  
> relatively straight forward. Here's some code I came up with:
> 
>    http://gist.github.com/3304
> 
> I figured out the z-index after about 20 minutes of banging my head  
> against the wall with Firebug (which was an extreme asset in figure  
> this all out).
> 
> I'm stumbling right now on extracting the proper x/y and lat/long from  
> OpenLayers. I'm not sure if clientX/Y is the correct property to  
> access, since it seems to be affected by the position of the map div  
> on the page.

var xy = map.events.getMousePosition(evt);

Where 'evt' is the object with clientX/clientY will probably do what you
want.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list