bokeh.models.map_plots

Models for displaying maps in Bokeh plots.

class GMapOptions(**properties)

Options for GMapPlot objects.

map_type

property type: map_type:Enum(‘satellite’, ‘roadmap’, ‘terrain’, ‘hybrid’)

The map type to use for the GMapPlot.

styles

property type: styles:JSON

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

class GMapPlot(**kwargs)

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: api_key: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: map_options: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"
  },
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "1ebbc512-9def-42f7-abb7-7d94362ccebd",
  "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",
  "tags": [],
  "title": {
    "id": "eee2e761-6c3f-4a7a-a8bd-19839dfc4772",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "86d2750e-41ef-44fb-b5f9-3d1a418ec749",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "732bd6a6-9996-4da3-a56f-a808f68dd2d0",
    "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(**properties)

Abstract base class for map options’ models.

lat

property type: lat:Float

The latitude where the map should be centered.

lng

property type: lng:Float

The longitude where the map should be centered.

zoom

property type: zoom:Int

The initial zoom level to use when displaying the map.

class MapPlot(**kwargs)

Bases: bokeh.models.plots.Plot

Abstract base class for map plot models.

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"
  },
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "c04dbccf-ac1b-4f6f-a770-daa5d1bf2af8",
  "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",
  "tags": [],
  "title": {
    "id": "65eddb2c-259a-4112-9d26-16eab2951211",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "1b1ffdd7-2d65-4e93-bc49-2fcd60547e0f",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "27cb163d-329c-4a43-9af8-0ce65d0b1f2f",
    "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
}