[GIS] How to get attribute of the leaflet marker

cssjqueryleafletmarkers

is there a way to get and hold the option attribute of the leaflet marker?

marker = L.marker([lat,lng], {draggable:true,icon: L.AwesomeMarkers.icon({icon: '', prefix: 'fa', markerColor: 'darkblue',html:(100)}) });

In the above marker, how will I able to get the option attribute of ther marker like jquery .css method. such as, How to get if the marker draggable is true or false, or html value (100) like the .CSS attribute of jQuery $("#Div).css("color");

Best Answer

If you still have the reference to your marker, simply use marker.options to access the options object assigned to it. In your case: marker.options.draggable.