Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function onMapClick(e) {
  2. e.layer._leaflet_id = 'polyindex'+polyindex+'';
  3. //increment polyindex used for unique polygon id's
  4. polyindex++;
  5. map._leaflet_id.setStyle(highlightFeature);
  6. }
  7.  
  8. function onEachFeature(feature, layer) {
  9. layer.on({
  10. mouseover: highlightFeature,
  11. mouseout: resetHighlight,
  12. click: onMapClick
  13. });
  14. layer._polygonId = feature.id
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement