how to know which marker clicked

المشرف العام

Administrator
طاقم الإدارة
I have many markers on my mapbox map. And how to know which marker is clicked. Here is my code

function zoomToFeature(e) { console.log(e);}function onEachFeature(feature, layer) { if (feature.properties && feature.properties.title){ layer.bindPopup(feature.properties.title); } layer.on({ click: zoomToFeature });}var country= L.geoJson(country).addTo(map);var marker = L.geoJson(markers,{ onEachFeature: onEachFeature}).addTo(map);

أكثر...
 
أعلى