I'm a complete noob so bear with me please -
Currently users can add markers and my plan is to use the ondraw
event to get the marker lat/lng and store that in mongodb, however i don't know how to get the individual markerID - ._leaflet_id
returns same id for every marker.
But if i generate id for the marker using something like Date.now()
how can i fetch that id from db if a user clicks on a marker? Each marker needs to be unique since each one will have a different redirect for onclick()
.
Thank you