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>
&nbsp;&nbsp;&nbsp; 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>
&nbsp;&nbsp;&nbsp; to click and drag a marker anywhere on the screen. (not *too* tough)<br>
&nbsp;&nbsp;&nbsp;&nbsp; - You should be sure to set some sort of global (or tagged to your OpenLayers.Map <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object) flag that indicates that a marker is being dragged. <br>
<br>
- You then register an &quot;onmouseup&quot; even on your OpenLayers.Map.events, and <br>
&nbsp;&nbsp; in that function you:<br>
&nbsp;&nbsp;&nbsp;&nbsp; - check to make sure the marker-dragging flag is set<br>
&nbsp;&nbsp;&nbsp;&nbsp; - get the current mousepx<br>
&nbsp;&nbsp;&nbsp;&nbsp; - translate that mousepx into lonlat<br>
&nbsp;&nbsp;&nbsp;&nbsp; - 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> &lt;<a href="mailto:euzuro@gmail.com">euzuro@gmail.com</a>&gt; 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 &lt;<a href="mailto:drrobison@openroadsconsulting.com">drrobison@openroadsconsulting.com</a>&gt; wrote:<br>&gt; I am new to OpenLayers. What I want to do is to drag a marker to another
<br>&gt; component on the page. I am using ZK and want to drag a marker<br>&gt; representing a camera to a DIV and then catch the drop and display the<br>&gt; snapshot corresponding to that marker. Is it possible to drag markers in
<br>&gt; OpenLayers off the map and to another component?<br>&gt;<br>&gt; Thanks, David Robison<br>&gt;<br>&gt; --<br>&gt;<br>&gt; David R Robison<br>&gt; Open Roads Consulting, Inc.<br>&gt; 708 S. Battlefield Blvd., Chesapeake, VA 23322
<br>&gt; phone: (757) 546-3401<br>&gt; e-mail: <a href="mailto:drrobison@openroadsconsulting.com">drrobison@openroadsconsulting.com</a><br>&gt; web: <a href="http://openroadsconsulting.com">http://openroadsconsulting.com</a>
<br>&gt; blog: <a href="http://therobe.blogspot.com">http://therobe.blogspot.com</a><br>&gt; book: <a href="http://www.xulonpress.com/bookstore/titles/1597816523.htm">http://www.xulonpress.com/bookstore/titles/1597816523.htm
</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>&gt; <a href="http://openlayers.org/mailman/listinfo/users">
http://openlayers.org/mailman/listinfo/users</a><br>&gt;<br></blockquote></div><br>