[OpenLayers-Users] Dragging a DOM element onto an OpenLayers map
Kevin Marsh
kmarsh at formandfx.com
Wed Jul 30 15:03:13 EDT 2008
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.
Thanks,
Kevin
On Jul 29, 2008, at 6:01 PM, bradleyspencer wrote:
> Kevin,
>
> I do this a lot. I use dom-drag.js lib that does this very well. You
> just
> have to make sure the map Div z-index is set to 0 for FF3.
>
> Script featured on Dynamic Drive (http://www.dynamicdrive.com) Just
> get to
> the dom-drag.js stuff.
>
> Cheers,
>
> Brad Spencer
>
>
>
>
>
> -----Original Message-----
> From: users-bounces at openlayers.org
> [mailto:users-bounces at openlayers.org]On Behalf Of Kevin Marsh
> Sent: Monday, 28 July 2008 11:31 PM
> To: users at openlayers.org
> Subject: [OpenLayers-Users] Dragging a DOM element onto an OpenLayers
> map
>
>
> I have a list of items in an unordered list (ul) on the same page as
> my OpenLayers maps. I'd like to be able to drag a list item (li) onto
> OpenLayers, send an AJAX request (to store the coordinate info on the
> server), then place a marker on the map in that position.
>
> Is this possible? I've looked through the examples and didn't find
> anything similar.
>
> Kevin Marsh
> Partner, <form> && f(x)
> Web Incubation, Design, and Development
> Toledo, Ohio
> http://formandfx.com
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
Kevin Marsh
Partner, <form> && f(x)
Web Incubation, Design, and Development
Toledo, Ohio
http://formandfx.com
More information about the Users
mailing list