谷歌地图API的Figure(layout = FigureLayout(height ='420px'))错误?

我正在尝试使用以下代码在jupyter笔记本上遵循google maps api教程:

import gmaps
import gmaps.datasets

gmaps.configure(api_key='AI...')

earthquake_df = gmaps.datasets.load_dataset_as_df('earthquakes')
earthquake_df.head()

locations = earthquake_df[['latitude','longitude']]
weights = earthquake_df['magnitude']
fig = gmaps.figure()
fig.add_layer(gmaps.heatmap_layer(locations,weights=weights))
fig

但该图未显示,相反,我仅得到:

Figure(layout=FigureLayout(height='420px')) 

我检查了我的凭据,并且启用了Maps and Places API,并且API密钥正确。我该如何解决这个问题?

glueyou 回答:谷歌地图API的Figure(layout = FigureLayout(height ='420px'))错误?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3150416.html

大家都在问