Google map does not display correctly in jupyter notebook

拜拜、爱过 提交于 2020-04-10 04:04:29

问题


I'm trying to use google map API to visualize some data in jupyter notebook. Here is the code I used to display basic map in jupyter:

import gmaps
import os
import json
import gmaps.datasets

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

fig=gmaps.figure()

fig

After I ran the code, nothing was displayed. I used my own google API key and couldn't figure out why the map isn't displayed. I'm new to the geojson field, so any idea or thoughts is appreciated.


回答1:


Did you make sure Widgets are enabled in your jupyter? try this before you run Jupyter:

jupyter nbextension enable --py gmaps
jupyter nbextension enable --py widgetsnbextension


来源:https://stackoverflow.com/questions/45779271/google-map-does-not-display-correctly-in-jupyter-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!