nbinteract创建的网页无法加载gmaps小部件

时间:2019-07-10 08:47:52

标签: python google-maps jupyter ipywidgets

我已经使用nbinteract和活页夹来发布网页。除无法加载gmaps小部件外,其他所有小部件在页面中似乎都可以正常工作。

我已经包含了requirements.txt中所需的所有软件包,并且该地图已成功加载到jupyter笔记本中。我不知道出了什么问题。我的怀疑是我省略了一些资料夹服务器设置。

我有以下代码:     导入gmap     导入gmaps.datasets

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

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

打开控制台时,它始终显示Error in widget initialization

0 个答案:

没有答案