首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CustomPane Folium Map类可用吗?

CustomPane Folium Map类可用吗?
EN

Stack Overflow用户
提问于 2020-06-30 16:47:54
回答 1查看 365关注 0票数 0

我正在学习Folium的github储存库上的示例(jupyter记事本),无法找到类CustomPane不工作的原因。

这是单元格中不起作用的代码:

代码语言:javascript
复制
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

运行代码的会导致以下错误:

代码语言:javascript
复制
---------------------------------------------------------------------------
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

EN

回答 1

Stack Overflow用户

发布于 2020-06-30 17:06:35

小叶CustomPane类wass在叶片中的添加量为0.9.0,而我所实验的错误明显是由于使用了0.5.0。

安装的Folium当前版本(0.11.0),工作良好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62662323

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档