Created
June 10, 2014 16:32
-
-
Save patrickarlt/83a6edd66273b10551c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = new L.Map('map').setView([ 45.543, -122.621 ], 13); | |
map.on('click', function(e){ | |
alert(e.latlng); | |
}); | |
var polygon = L.polypolygon(latlngs).addTo(map); | |
polygon.on('click', function(){ | |
if(toolIsActive){ | |
// do something custom since a tool is active | |
} else { | |
// otherwise fire the click on the map so get the latlng | |
map.fire('click', e); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment