NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

How do i make my marker moveable or draggable?

var markers = new OpenLayers.Layer.Markers("Markers");
            map.addLayer(markers);
            markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(data[0]['lon'], data[0]['lat']).transform( fromProjection, toProjection),icon));

asked 23 Aug '12, 13:34

kristiann's gravatar image

kristiann
11112
accept rate: 0%

edited 23 Aug '12, 15:42

scai's gravatar image

scai ♦
33.3k21309459


Hi; this isn't an OpenLayers support channel. You might have better luck with one of their mailing lists or #openlayers on IRC.

permanent link

answered 23 Aug '12, 15:59

mcw's gravatar image

mcw
41677
accept rate: 6%

For completing @mcw answer, your question isn't trivial. Take look at the OpenLayers documentation, and at this example.

permanent link

answered 23 Aug '12, 21:46

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×122
×98
×14
×6

question asked: 23 Aug '12, 13:34

question was seen: 9,903 times

last updated: 23 Aug '12, 21:46

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum