谁能指导我如何在 mplleaflet html 图中添加图例。其次如何选择初始缩放?
在 geopandas 中打开 shapefile 并在交互式 web 地图上绘制属性
示例代码:
import geopandas as gp
shapefile = 'shapefile/ne_50m_admin_0_countries.shp'
df_shapefile_countries = gpd.GeoDataFrame.from_file(shapefile)
import mplleaflet
ax = df_shapefile_countries .plot(column='pop_est')
mplleaflet.show(fig=ax.figure)
示例图片:我想立即放大到例如东南亚