leaflet-search
leaflet-search copied to clipboard
Search on the active Layer (change target with the radio button in L.control.layers)
Hello,
First of all thank you very much for this usefull search solution.
Is there any way to alternate the target of the research with a helper function like getActiveLayer?
I would like to have a unique search field that switches target according to the active Layer in L.control.layers. The layers are not Json objects but arrays of coordinates. I have looked into the documentation of Leaflet and the search plugin but I have not found anything.
Thanks,
@princeN Hi very interesting issue.. thank you too for this question. In a Leaflet map active layers can be more than one.. then I think that the best way could be to add new method in the Leaflet Control Search for select at run time the layer to searching... and switch it on map event layeradd
you're okay?
Is possible searching with control search in the active layers of control?