javascript - Marker setDraggable for Leaflet? -


Any suggestions about changing the dragibility of a marker with any other event?

For example, I have:

  marker = (L. marker ([0,0], {pullable: true}));   

Then I can do things like this later:

  marker.setikon (Maikon) .setLatLng (mylatlng) .addTo (map);   

How will I change the dragable to false? I have many markers and I need to toggle dragability for different markers, so I do not even want to freeze the entire map.

Thanks

The answer is in the documentation:

 < Code> marker.dragging.enable (); Marker.dragging.disable ();    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -