Python 围绕特定GPS坐标将bokeh地图居中
使用显示墨卡托地图的bokeh示例,如何围绕一组特定的GPS坐标将地图居中Python 围绕特定GPS坐标将bokeh地图居中,python,bokeh,Python,Bokeh,使用显示墨卡托地图的bokeh示例,如何围绕一组特定的GPS坐标将地图居中 from bokeh.plotting import figure, output_file, show from bokeh.tile_providers import CARTODBPOSITRON_RETINA, get_provider output_file("tile.html") tile_provider = get_provider(CARTODBPOSITRON_RETINA)
from bokeh.plotting import figure, output_file, show
from bokeh.tile_providers import CARTODBPOSITRON_RETINA, get_provider
output_file("tile.html")
tile_provider = get_provider(CARTODBPOSITRON_RETINA)
# range bounds supplied in web mercator coordinates
p = figure(x_range=(-2000000, 6000000), y_range=(-1000000, 7000000),
x_axis_type="mercator", y_axis_type="mercator")
p.add_tile(tile_provider)
show(p)
获得
tile\u提供程序后
可以更改默认值,如下所示:
tile_provider.x_origin_offset = 20037508.34
tile_provider.y_origin_offset = 25037508.34
tile_provider.initial_resolution = 180000