For the record, dragging markers *onto* the map would not be particularly difficult. <br>
<br>
Off the top of my head, the way you would go about this is:<br>
<br>
- make a map, add a baselayer and a markers layer<br>
<br>
- in your application code, you can create markers on your own and place them<br>
where you wish on your toolbar. <br>
<br>
- You will then have to write your own little drag-n-drop handler to allow the user <br>
to click and drag a marker anywhere on the screen. (not *too* tough)<br>
- You should be sure to set some sort of global (or tagged to your OpenLayers.Map <br>
object) flag that indicates that a marker is being dragged. <br>
<br>
- You then register an "onmouseup" even on your OpenLayers.Map.events, and <br>
in that function you:<br>
- check to make sure the marker-dragging flag is set<br>
- get the current mousepx<br>
- translate that mousepx into lonlat<br>
- add the marker to your markers layer at that given lonlat.<br>
<br>
Note that I haven't *tried* the above code, but off the top of my head, I don't see why<br>
this shouldn't work. <br>
<br>
If anyone wants to put together a demo that does this, it would be awesome. <br>
<br>
Erik<br>
<br><br><div><span class="gmail_quote">On 10/10/06, <b class="gmail_sendername">Erik Uzureau</b> <<a href="mailto:euzuro@gmail.com">euzuro@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi David,<br><br>Currently, OpenLayers does not support dragging makers on or off the map,<br>nor do we support ZK.<br><br>If there is community interest, however, we should maybe look into either or<br>both of these.... anyone?
<br><br>Erik<br><br>On 10/6/06, David R Robison <<a href="mailto:drrobison@openroadsconsulting.com">drrobison@openroadsconsulting.com</a>> wrote:<br>> I am new to OpenLayers. What I want to do is to drag a marker to another
<br>> component on the page. I am using ZK and want to drag a marker<br>> representing a camera to a DIV and then catch the drop and display the<br>> snapshot corresponding to that marker. Is it possible to drag markers in
<br>> OpenLayers off the map and to another component?<br>><br>> Thanks, David Robison<br>><br>> --<br>><br>> David R Robison<br>> Open Roads Consulting, Inc.<br>> 708 S. Battlefield Blvd., Chesapeake, VA 23322
<br>> phone: (757) 546-3401<br>> e-mail: <a href="mailto:drrobison@openroadsconsulting.com">drrobison@openroadsconsulting.com</a><br>> web: <a href="http://openroadsconsulting.com">http://openroadsconsulting.com</a>
<br>> blog: <a href="http://therobe.blogspot.com">http://therobe.blogspot.com</a><br>> book: <a href="http://www.xulonpress.com/bookstore/titles/1597816523.htm">http://www.xulonpress.com/bookstore/titles/1597816523.htm
</a><br>><br>><br>><br>><br>> _______________________________________________<br>> Users mailing list<br>> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/users">
http://openlayers.org/mailman/listinfo/users</a><br>><br></blockquote></div><br>