A very simple question is how can I create a draggable marker in an OpenLayers map and get latlon when dragging it. From Google it seems that you can drag vectors, but not drag markers.
I saw some links to OpenLayers.Control.DragMarker , but this does not seem to be in the "main" library. It was used in this example, but it looks like it is using a custom JS OpenLayers file, so I have no idea how to include this in my code.
Code so far (to add a simple token):
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));
Matt roberts
source share