map.on('click') limit number of pins added to map - leaflet js

المشرف العام

Administrator
طاقم الإدارة
I'm using Leaflet js and I want a user to be able to add a single point to the map (and not get trigger happy and add lots of pins), what do I need to do to modify the below so that this can happen.

map.on('click', function(e){ var Marker = L.marker(e.latlng,{ draggable: true }).addTo(map); Si



أكثر...
 
أعلى