from folium.plugins import Search
geojson_obj = folium.GeoJson(points, style_function=style_one).add_to(marker_cluster)
statesearch = Search(layer=marker_cluster,
geom_type=‘Point’,
placeholder=“Search”,
collapsed=True,
search_label=‘name’,
search_zoom=14,
position=‘topright’
).add_to(m)
search_label 为搜索对应字段
folium添加搜索项
于 2021-12-31 10:50:33 首次发布