Google地图在Jupyter Notebook中无法正确显示

Zhe*_* Bo 2 geojson google-maps-api-3 pandas jupyter-notebook

我正在尝试使用Google Map API可视化jupyter笔记本中的某些数据。这是我用来在jupyter中显示基本地图的代码:

import gmaps
import os
import json
import gmaps.datasets

gmaps.configure(api_key="AIz....")

fig=gmaps.figure()

fig
Run Code Online (Sandbox Code Playgroud)

运行代码后,什么都没有显示。我使用了自己的Google API密钥,无法弄清楚为什么不显示地图。我是geojson领域的新手,所以任何想法或想法都值得赞赏。

小智 5

您是否确定在jupyter中启用了小部件?在运行Jupyter之前,请尝试以下操作:

jupyter nbextension enable --py gmaps
jupyter nbextension enable --py widgetsnbextension
Run Code Online (Sandbox Code Playgroud)