Leaflet: how can I find all geo-json features at a certain position

المشرف العام

Administrator
طاقم الإدارة
For a small project we are using leaflet with geojson features instead of openlayers backed by geoserver.

Now, when I click in the map, I want to see a list of all features in that position.

I use the onEachFeature to attach a popup to all visible features (in separate layers), but not entirely unexpected, only the top-item catches this click-event and shows the popup.

I have been looking in the documentation and searching for examples, but I did not find something useable. In the openlayers+geoserver I would use the WFS service to get all features, and then I would display the returned result.

Do I need to switch to geoserver, or is this possible with geojson features (in leaflet) as well?



أكثر...
 
أعلى