SyntaxFix
Write A Post
Hire A Developer
Questions
Here's a jsfiddle with a function call: https://jsfiddle.net/8282emwn/
var marker = new L.Marker([46.947, 7.4448]).on('click', markerOnClick).addTo(map); function markerOnClick(e) { alert("hi. you clicked the marker at " + e.latlng); }