map_plots#

Models for displaying maps in Bokeh plots.

class GMapOptions(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Options for GMapPlot objects.

map_type#

The map type to use for the GMapPlot.

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.

tilt#

Tilt angle of the map. The only allowed values are 0 and 45. Only has an effect on ‘satellite’ and ‘hybrid’ map types. A value of 0 causes the map to always use a 0 degree overhead view. A value of 45 causes the tilt angle to switch to 45 imagery if available.

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_key property must be configured with a Google API Key in order for GMapPlot to 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 Range1d ranges are supported. Attempting to use other range types will result in an error.

  • Usage of BoxZoomTool is incompatible with GMapPlot. Adding a BoxZoomTool will 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.

class MapPlot(*args: Any, id: ID | None = None, **kwargs: Any)[source]#

Abstract base class for map plot 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.