Leaflet Marker - toggle draggable

المشرف العام

Administrator
طاقم الإدارة
I have a leaflet marker created similar to the example below.

var marker = L.marker([map.getCenter().lat,map.getCenter().lng], { alt: tempID, icon: starIcon, draggable: true }) .addTo(map) I would like to toggle the draggable property. I've tried accessing manually like below to no avail.. Any suggestions?

marker.options.draggable=false;

أكثر...
 
أعلى