python - 错误:从 Google Coblab 中的 osmnx folium 加载背景地图时出现“localhost 拒绝连接”
问题描述
我正在使用谷歌 Colab。ox.plot_graph_folium
我正在尝试通过osmnx的内置函数将背景图添加到网络图。
但是,地图没有显示出来。
我的代码:
graph_map = ox.plot_graph_folium(G, popup_attribute='name', edge_width=2)
# save as html file then display map as an iframe
filepath = 'stockholm.html'
graph_map.save(filepath)
IFrame(filepath, width=900, height=500)
错误信息:
localhost 拒绝连接。
尝试修复它
我已经阅读了一个可能与 StackOverflow 相关的问题(此处)。老实说,我是个业余爱好者。我真的不明白代码的含义。但是,我仍然尝试过,但它仍然不起作用。
!ln -s /usr/local/share/jupyter/nbextensions /nbextensions
%cd /nbextensions
任何帮助,将不胜感激。
解决方案
推荐阅读
- python-3.x - 使用Python将新值插入SortedLinked List?
- java - 如何在另一个 LinkedList 的末尾分配一个 LinkedList 的一部分?
- r - 长到宽格式聚合 R tidyverse
- python - 如何在python中将字节转换为字符
- python - 在 PySpark RDD 上应用自定义文件解析器
- html - 如何将 div 与 img 对齐?
- powershell - 在 Windows Docker 容器中运行 Visual Studio C++ 2017 编译的可执行文件
- python - KeyError: 'image_url' Traceback (last recent call last) 烧瓶 api 响应错误
- android - 如何检查和使用 Google Play 服务 更新的安全性 在反应原生应用程序中提供以保护应用程序免受 OpenSSL 漏洞的影响
- apache-kafka - Nest.JS CQRS:有没有办法通过在后台使用 Kafka 或 RabbitMQ 使命令总线和队列在外部?谢谢