我正在尝试使用以下代码在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密钥正确。我该如何解决这个问题?