stefanocudini / leaflet-search

Search stuff in a Leaflet map
https://opengeo.tech/maps/leaflet-search/
MIT License
772 stars 334 forks source link

how to use this with your panel control plugin? #329

Open iowprow opened 6 months ago

iowprow commented 6 months ago

I am using your fab panel control plugin to create many layers which go into the control panel to be turned on and off. All 30 geojson files are called via the

$.getJSON('data.geojson', function(j) { l.addData(j); });

and added to the overLayers object and onto the map via

var panelLayers = new L.Control.PanelLayers(baseLayers, overLayers, { compact: true, //groupCheckboxes: true, collapsibleGroups: true, selectorGroup: true, }); map.addControl(panelLayers);

If I want to search the geojson features added by the above (like your multiple layers example) what layername do I use for the layergroup? I tried using "panelLayers" as above but that didn't work.

Thanks

dem10com commented 2 months ago

I'm stuck here too. Did you find a solution?