Wednesday, 7 October 2015

Leaflet: 4 overlay layers, 1 click, get properties of all intersecting polygons.


I have a leaflet application where I have 4 layers that have many intersecting polygons such as, a counties layer, a school districts layer, a cities layer, and a layer of miscellaneous areas. All cities and miscellaneous areas physically intersect with counties and school districts. Some miscellaneous areas intersect with cities. I need "on" my click to get a popup that tells me the feature properties of each polygon at each layer - if that layer is indeed selected. I am having a terrible time working on a solution.


I love how I can loop over each layer in the leaflet L.featureGroup function. But I am stumped with querying each layer's features past that. I see the ._layer elements returned in the console. I suspect I need to detect intersections. Can someone point me in the right direction in terms of plugins and or leaflet methods.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...