我正在学习Folium的github储存库上的示例(jupyter记事本),无法找到类CustomPane不工作的原因。
这是单元格中不起作用的代码:
m = folium.Map([43, -100], zoom_start=4, tiles="stamentonerbackground", attr="My attr")
folium.GeoJson(geo_json_data).add_to(m)
folium.map.CustomPane("labels").add_to(m)
# Final layer associated to custom pane via the appropriate kwarg
folium.TileLayer("stamentonerlabels", pane="labels").add_to(m)
m.save(os.path.join('results', 'CustomPanes_1.html'))
m运行代码的会导致以下错误:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
3 folium.GeoJson(geo_json_data).add_to(m)
4
----> 5 folium.map.CustomPane("labels").add_to(m)
6
7 # Final layer associated to custom pane via the appropriate kwarg
AttributeError: module 'folium.map' has no attribute 'CustomPane'有什么能帮你澄清问题的吗?
Folium版本0.5.0
Python 3.7.7
发布于 2020-06-30 17:06:35
小叶CustomPane类wass在叶片中的添加量为0.9.0,而我所实验的错误明显是由于使用了0.5.0。
安装的Folium当前版本(0.11.0),工作良好。
https://stackoverflow.com/questions/62662323
复制相似问题