bokeh.models.map_plots

Models for displaying maps in Bokeh plots.

class GMapOptions(**kwargs)[source]

Bases: bokeh.models.map_plots.MapOptions

Options for GMapPlot objects.

map_type

property type: Enum ( MapType )

The map type to use for the GMapPlot.

scale_control

property type: Bool

Whether the Google map should display its distance scale control.

styles

property type: JSON

A JSON array of map styles to use for the GMapPlot. Many example styles can be found here.

JSON Prototype
{
  "id": "0adcf0db-ce95-4539-8fd4-1b54bd41ecb8",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "lat": null,
  "lng": null,
  "map_type": "roadmap",
  "name": null,
  "scale_control": false,
  "styles": null,
  "subscribed_events": [],
  "tags": [],
  "zoom": 12
}
class GMapPlot(**kwargs)[source]

Bases: bokeh.models.map_plots.MapPlot

A Bokeh Plot with a Google Map displayed underneath.

Data placed on this plot should be specified in decimal lat long coordinates e.g. 37.123, -122.404. It will be automatically converted into the web mercator projection to display properly over google maps tiles.

api_key

property type: String

Google Maps API requires an API key. See https://developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.

map_options

property type: Instance ( GMapOptions )

Options for displaying the plot.

JSON Prototype
{
  "above": [],
  "api_key": null,
  "background_fill_alpha": {
    "value": 1.0
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "below": [],
  "border_fill_alpha": {
    "value": 1.0
  },
  "border_fill_color": {
    "value": "#ffffff"
  },
  "css_classes": null,
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "639c1c59-bd14-4cd3-ad13-a917641aa46e",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "map_options": null,
  "min_border": 5,
  "min_border_bottom": null,
  "min_border_left": null,
  "min_border_right": null,
  "min_border_top": null,
  "name": null,
  "outline_line_alpha": {
    "value": 1.0
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#e5e5e5"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "right": [],
  "sizing_mode": "fixed",
  "subscribed_events": [],
  "tags": [],
  "title": {
    "id": "ebab8065-2d6c-4ce0-9274-55f50d743bc8",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "a1b74b19-04c2-4c59-8397-0f596a704be3",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "06ab9353-d5ef-4c67-9cd7-27d4bd1e2c93",
    "type": "Toolbar"
  },
  "toolbar_location": "right",
  "toolbar_sticky": true,
  "v_symmetry": false,
  "webgl": false,
  "width": null,
  "x_mapper_type": "auto",
  "x_range": null,
  "y_mapper_type": "auto",
  "y_range": null
}
class MapOptions(**kwargs)[source]

Bases: bokeh.model.Model

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

property type: Float

The latitude where the map should be centered.

lng

property type: Float

The longitude where the map should be centered.

zoom

property type: Int

The initial zoom level to use when displaying the map.

JSON Prototype
{
  "id": "5c46975e-9ca6-4684-88dc-bb8c42145f1a",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "lat": null,
  "lng": null,
  "name": null,
  "subscribed_events": [],
  "tags": [],
  "zoom": 12
}
class MapPlot(**kwargs)[source]

Bases: bokeh.models.plots.Plot

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.

JSON Prototype
{
  "above": [],
  "background_fill_alpha": {
    "value": 1.0
  },
  "background_fill_color": {
    "value": "#ffffff"
  },
  "below": [],
  "border_fill_alpha": {
    "value": 1.0
  },
  "border_fill_color": {
    "value": "#ffffff"
  },
  "css_classes": null,
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "4f7d471f-ed4f-4a17-bc3d-b9752277999c",
  "js_event_callbacks": {},
  "js_property_callbacks": {},
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "min_border": 5,
  "min_border_bottom": null,
  "min_border_left": null,
  "min_border_right": null,
  "min_border_top": null,
  "name": null,
  "outline_line_alpha": {
    "value": 1.0
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#e5e5e5"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "right": [],
  "sizing_mode": "fixed",
  "subscribed_events": [],
  "tags": [],
  "title": {
    "id": "39aee003-a61d-4bd8-8d5a-f88efcad039e",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "6f070faa-ffdc-4063-8ed4-aae427347b86",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "e35b6d4b-fb0c-44de-9036-2ff9b44fc0bc",
    "type": "Toolbar"
  },
  "toolbar_location": "right",
  "toolbar_sticky": true,
  "v_symmetry": false,
  "webgl": false,
  "width": null,
  "x_mapper_type": "auto",
  "x_range": null,
  "y_mapper_type": "auto",
  "y_range": null
}