Google maps Gmap不会出现在Spyder中

Google maps Gmap不会出现在Spyder中,google-maps,anaconda,spyder,python-3.7,Google Maps,Anaconda,Spyder,Python 3.7,我正在运行一个简单的示例: import gmaps import gmaps.datasets gmaps.configure(api_key="...") earthquake_df = gmaps.datasets.load_dataset_as_df( 'earthquakes' ) locations = earthquake_df[[ 'latitude' , 'longitude' ]] weights = earthquake_df[ 'magnitude' ] fig

我正在运行一个简单的示例:

import gmaps
import gmaps.datasets

gmaps.configure(api_key="...")
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
但输出显示的不是热图,而是:

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

我正在使用Spyder(Python3.7)

(此处为Spyder maintainer),原因很简单:Spyder无法在其控制台上显示web内容。我所说的web内容是指只能在web浏览器中呈现的内容。这就是
gmap
包的情况。

我明白了。有办法解决这个问题吗?还有,为什么我在这里被否决?这是个糟糕的问题吗?不,现在没有解决办法。你可能被否决了,因为你的问题对其他人来说不够清楚。我现在用folium来代替。它不会渲染太多。但至少我可以将其导出为html。@CarlosCordoba是否有任何方法可以替代
gmaps
包来获取谷歌地图,这在Spyder中是有效的?@MariuszSiatka,我不这么认为。然而,我们计划在Spyder 5(将于2020年发布)上添加一个web内容查看器,这将解决这个问题。