map_plots#
Models for displaying maps in Bokeh plots.
- class GMapOptions(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
Options for
GMapPlotobjects.- scale_control#
Whether the Google map should display its distance scale control.
- styles#
A JSON array of map styles to use for the
GMapPlot. Many example styles can be found here.
- class GMapPlot(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A Bokeh Plot with a Google Map displayed underneath.
Data placed on this plot should be specified in decimal lat/lon coordinates e.g.
(37.123, -122.404). It will be automatically converted into the web mercator projection to display properly over google maps tiles.The
api_keyproperty must be configured with a Google API Key in order forGMapPlotto function. The key will be stored in the Bokeh Document JSON.Note that Google Maps exert explicit control over aspect ratios at all times, which imposes some limitations on
GMapPlot:Only
Range1dranges are supported. Attempting to use other range types will result in an error.Usage of
BoxZoomToolis incompatible withGMapPlot. Adding aBoxZoomToolwill have no effect.
- api_key#
//developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.
- Type:
Google Maps API requires an API key. See https
- api_version#
//developers.google.com/maps/documentation/javascript/versions for more information.
Note
Changing this value may result in broken map rendering.
- Type:
The version of Google Maps API to use. See https
- map_options#
Options for displaying the plot.
- class MapOptions(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
Abstract base class for map options’ models.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
- lat#
The latitude where the map should be centered.
- lng#
The longitude where the map should be centered.
- zoom#
The initial zoom level to use when displaying the map.