leaflet-search
leaflet-search copied to clipboard
Fire click event
Is there a way to fire a click event when search location is found? I would like to have a popup opened when the location searched for is clicked, but since i am using leaflet Point in Polygon and generating my popups through "zoomToFeatures" function, which is called when the map is clicked on, the normal function of the leaflet-search code to open popups does not work.
Here is my github repo: https://github.com/jeffjb4488/GeoJASON_test
Thank you very much, Jeff
const searchControl = new L.Control.Search({
...
moveToLocation: (latlng, title, map) => {
latlng.layer.fire('click');
}
})