title: How to create a simple draggable marker in OpenLayers
body: <p>Very simple question, how can I create a draggable marker in an OpenLayers map, and get the latlon when its been dragged. From google, it seems that you can have draggable vectors, but not draggable markers.</p>
  
  <p>I've seen some references to <code>OpenLayers.Control.DragMarker</code>, but this doesn't seem to be in the "core" library. It's used in <a href="http://dev.openlayers.org/sandbox/tschaub/feature/examples/drag-marker.html" rel="nofollow">this</a> example but that seems to be using a custom OpenLayers JS file, so I have no idea how to go about including that in my code.</p>
  
  <p>Code thus far (to add a simple marker):</p>
  
  <pre><code>var layer = new OpenLayers.Layer.TMS( "TMS The Layer","",
      {  url: '', serviceVersion: '.', layername: '.', alpha: true,
          type: 'png', getURL: overlay_getTileURL 
      });
  
  map.addLayers([layer]);
  
  
      var markers = new OpenLayers.Layer.Markers( "Markers" );
      map.addLayer(markers);
      var lonLat = new OpenLayers.LonLat( -100 ,100 );
      markers.addMarker(new OpenLayers.Marker(lonLat));
  </code></pre>