参考:https://github.com/python-visualization/folium
https://zhuanlan.zhihu.com/p/384078185?utm_id=0
https://www.w3cschool.cn/article/37568875.html
其他还有baidu:echarts
安装:
pip install folium
代码(离线地图,不然打开很慢):
参考:https://blog.csdn.net/qq_45911984/article/details/127971785
这是腾讯地图
tiles=‘http://rt1.map.gtimg.com/realtimerender?z={z}&x={x}&y={-y}&type=vector&style=6’,
import folium
from folium.plugins import HeatMap
lng = df3["lng"]
lat = df3["lat"]
avgLng = lng.mean()
avgLat = lat.mean()
data = []
mm = folium.Map(location=[avgLat,avgLng], zoom_start=8,tiles='https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=7',# 默认参数attr='default') ##这是高德地图
for i in range(0, len(lat)):tmp = []tmp.append(lat[i])tmp.append(lng[i])# folium.Marker(location=[lat[i],lng[i]]).add_to(mm)folium.Circle(location=[lat[i],lng[i]],color='red',radius=50).add_to(mm)mm.save("imsiLocMap02.html")