☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Best way to stream gmap plot center/zoom level

Community Support
Hickson49
Hickson49

Based on some server side activity (post request received) I want to update the google map plot on client side (based on bokeh.plotting.gmap) with a new lat/long (+eventually zoom level).

Unfortunately, all the example I found in the documentation are completely static, ie, it doesn’t seem to be expected that the center position for the plot is changed. For instance, there doesn’t seems to be any source object for gmap.

At some point I thought it would be fine to initialize gmap object without lat, lon parameters, and any subsequence call to object.circle or object.patch would center the view on whatever has been plotted.

Unfortunately it doesn’t seem to work like that…

Any help would be appreciated.
Thank you

⌁   Link to post
Hickson49
Hickson49

Ok so there is actually a way, not through streaming to a source, but simply by setting the property accordingly to the right document element:

doc.roots.map_options.lat = lat
doc.roots.map_options.lng = long

You can also set the name attribute to your plot and select the right document root based on this attribute.

⌁   Link to post

End of archived discussion · Replies are disabled