Searchbar for cities
See original GitHub issueHi
I displayed on the map an important list of suppliers all over the country (France), I need to search for cities and zoom in in order to see which suppliers are around.
So beside my list of suppliers I got a json list of all cities of France with names and coordinates, I display them with the search plugin, and add layer control in order to hide the markers.
with open('villes.json') as fp:
points = ``json.load(fp)
geojson_obj = folium.GeoJson(points, show=False).add_to(m)
plugins.Search(geojson_obj, geom_type='Point', placeholder="Search", collapsed=True, search_label='Ville', search_zoom=20, position='topleft').add_to(m)
folium.LayerControl().add_to(m)
m.save(map.html)
But I face two problems :
- As they are about 35k cities, the map takes some much time to load
- We still have the option to show markers in the LayerControl, and if it is activated, this is the end…
Could it be possible to solve both problems ?
Or could it be possible to add external search plugin from Openstreetmaps for instance?
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Places Search Box | Maps JavaScript API - Google Developers
The search box returns a pick list that includes both places and predicted search terms.
Read more >How to add a Place Autocomplete search widget to your website
In this episode of Geocasts, learn how to add a Place Autocomplete search bar to a webpage with the client-side Maps JavaScript API....
Read more >Tutorial: Autocomplete Cities Using the Google Places API
How to use the Google Places API with your input fields to autocomplete cities and states. Full code on github: https://git.io/v9ZSt.
Read more >Search locations on Google Maps - Android
You can search for places and locations with Google Maps. When you sign in to Google Maps, you can get more detailed search...
Read more >Places Search Bar | PlacesSearchBar - GitHub Pages
An extension of Xamarin.Forms SearchBar control for implementing Google Places Autocomplete API.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With a colleague’s help, I’ve managed to alter the Geocoder class in order to use the Google Maps geocoding service. I’ll leave the code here just in case someone has the same problem.
Many thanks for your help!
I’ll try that. Thanks!