smeijer / leaflet-geosearch

A geocoding/address-lookup library supporting various api providers.
https://smeijer.github.io/leaflet-geosearch/
MIT License
1.04k stars 273 forks source link

Is it possible to add only one search bar to the multiple maps #292

Closed narsireddypanta closed 3 years ago

narsireddypanta commented 3 years ago

My application is having 3 individual maps and i want only one search bar for 3 maps.

smeijer commented 3 years ago

Sure, you can use the providers directly instead of adding them to the map. Then once you get search results, you'll update the map accordingly.

See here for an example:

https://smeijer.github.io/leaflet-geosearch/usage#using-the-providers-directly