python-visualization / folium

Python Data. Leaflet.js Maps.
https://python-visualization.github.io/folium/
MIT License
6.79k stars 2.22k forks source link

Add Search Box on Folium map #464

Closed sangyh closed 6 years ago

sangyh commented 8 years ago

Can anybody point me towards how to add a Search box on Folium? I know Leaflet has this functionality but couldn't find any documentation on Folium. Thanks in advance.

morteza3000 commented 5 years ago

Yes, your example notebooks also don't work with provided data.

ghandic commented 5 years ago

I haven’t updated the pull request. Someone else made changes, I will have a look if I get chance. Maybe check who made the updates.

Sent from my iPhone

On 7 Apr 2019, at 16:07, Morteza Hasan Abadi notifications@github.com<mailto:notifications@github.com> wrote:

Yes, your example notebooks also don't work with provided data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/python-visualization/folium/issues/464#issuecomment-480562278, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWaWQaz2neyK2xg7LmMrjp3KFKYMVGilks5veYs9gaJpZM4JNCFm.

Conengmo commented 5 years ago

@morteza3000 please open a new issue for your problem and include:

morteza3000 commented 5 years ago

@Conengmo , please be informed that below issue has been raised. Problem with Folium search plugin (loading Geojosn Data) #1125

chillinshunsui commented 4 years ago

Thanks a lot, it works now. :)

image

hey, can you share the code

ghandic commented 4 years ago

Check out the example notebooks https://github.com/python-visualization/folium/blob/master/examples/plugin-Search.ipynb

GinoVillalpando commented 4 years ago

is there a search plugin that works for FastMarkerCluster? I can't use MarkerCluster because it hinders the load performance because I'm using over 11,000 markers.

morteza3000 commented 4 years ago

Check out the example notebooks https://github.com/python-visualization/folium/blob/master/examples/plugin-Search.ipynb

@ghandic , How we can style points in your example?

citygeo = folium.GeoJson( pop_ranked_cities, name='US Cities', tooltip=folium.GeoJsonTooltip( fields=['nameascii','pop_max'], aliases=['','Population Max'], localize=True) ).add_to(m)

how to add style_function to this in order to change points color or use custom icon?

zoesn89 commented 4 years ago

Hey everyone,

as the docs say, the search plugin can index FeatureGroup, MarkerCluster, GeoJson and TopoJson layers. It only worked for me on GeoJson layers so far.

Could you please provide an example for FeatureGroup or MarkerCluster without GeoJson?

Thanks in advance ;)

PhilippMDoerner commented 4 years ago

Looking at the Search plugins python file, search is currently only implemented for GeoJson and TopoJson. I'm not entirely sure as to why the documentation states that it also implements the search for FeatureGroup and MarkerClusters. Maybe there were/are plans down the line for it (?)

asemrbehat commented 3 years ago

Check out the example notebooks https://github.com/python-visualization/folium/blob/master/examples/plugin-Search.ipynb

@ghandic , How we can style points in your example?

citygeo = folium.GeoJson( pop_ranked_cities, name='US Cities', tooltip=folium.GeoJsonTooltip( fields=['nameascii','pop_max'], aliases=['','Population Max'], localize=True) ).add_to(m)

how to add style_function to this in order to change points color or use custom icon?

Hi, is there any way to do it by HTML ? I cant link the search box with the markers in order to search for them </>

AtharvaShekatkar commented 10 months ago

@ghandic hey, could you help me with using the search plugin for FeatureGroup layers? I've not been able to find a working solution for that anywhere.