Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onMapClick(e) {
- e.layer._leaflet_id = 'polyindex'+polyindex+'';
- //increment polyindex used for unique polygon id's
- polyindex++;
- map._leaflet_id.setStyle(highlightFeature);
- }
- function onEachFeature(feature, layer) {
- layer.on({
- mouseover: highlightFeature,
- mouseout: resetHighlight,
- click: onMapClick
- });
- layer._polygonId = feature.id
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement