【发布时间】:2018-04-03 18:49:42
【问题描述】:
我只能设置缩放,但我需要有一个非常具体的位置,这样我才能将它覆盖在另一个图上。 我如何仅从我在下面指定的限制中获得视图? 现在我只能设置难以覆盖在另一个绘图上的缩放。
from bokeh.io import output_file, show
from bokeh.models import ColumnDataSource, GMapOptions
from bokeh.plotting import gmap
output_file("gmap.html")
lat_lims = (42.418574999999997, 42.420059000000002)
lon_lims = (-70.907111, -70.904135999999994)
map_options = GMapOptions(lat=np.mean(lat_lims), lng=np.mean(lon_lims), map_type="satellite", zoom=18)
# For GMaps to function, Google requires you obtain and enable an API key:
#
# https://developers.google.com/maps/documentation/javascript/get-api-key
#
# Replace the value below with your personal API key:
p = gmap(googlemaps_api_key, map_options)
show(p)
【问题讨论】:
标签: python google-maps google-maps-api-3 bokeh satellite