python - MarkerCluster does not have a tooltip feature I would like to use the Hover option to display details on clusters in python language using Folium
问题描述
When I Hover-over the cluster I could see the details I need.. I set the clusters in a way they can be displayed in the form of clusters, region, district.. I need to show tooltips on every cluster according to my need. #####################################################################
import folium
from folium.plugins import MarkerCluster
import folium.plugins as plugins
cluster = df[["B_lat", "B_long"]].values.tolist()
MC = folium.plugins.MarkerCluster(name="MC", loc=cluster, tooltip="pakistan").add_to(
map_osm
)
if df["B_Balance"][point] < 50000:
folium.Marker(
all_location_list[point],
popup="Branchname:"
+ df["Branch_name"][point]
+ " Balance:"
+ df["B_Balance"][point].astype(str),
tooltip="Branchname:"
+ df["Branch_name"][point]
+ "<br>Balance:"
+ df["B_Balance"][point].astype(str),
icon=folium.Icon(
color="darkblue",
icon_color="white",
icon="university",
angle=0,
prefix="fa",
),
).add_to(MC)
解决方案
推荐阅读
- windbg - 调试“已添加具有相同键的项目”异常
- c++ - Cppcheck 静态代码分析器实际上可以检测到不太常见的警告,例如“相对路径遍历 (CWE-23)”或“缓冲区读取不足 (CWE-127)”吗?
- python-3.x - 给定一个方阵,计算其对角线之和之间的绝对差
- firebase - FutureBuilder 的嵌套期货
- javascript - 如果单击外部 div,则显示警报
- node.js - 处理自定义错误后Node JS错误崩溃
- angular - 带有查询参数的角度路由路径
- python-3.x - 如何在条形图中启用条形图上的数字
- django - 带有原始查询的 Django RawQuerySet 减法
- java - zigzag 的 java 数组有效,但测试人员一直告诉我有错误?