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": "8667cd27-0765-4acb-b7b1-48518727d969",
  "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": "3c92381e-876e-483a-a595-3c946208bb7a",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "2ee7cd3e-2345-49b0-b8e8-124748b3a8f3",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "6e9a0f64-f307-47c5-9001-6ed596f76e66",
    "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": "c98c4146-dbb1-4fe8-9663-506f5c0774e9",
  "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": "0ba4bad9-110d-408f-a851-551484fab0bc",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "b0dadcf7-d43a-4d88-bd5c-3102dde5d167",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "bfee8805-6166-4f33-a6e3-7439f37c2d38",
    "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
}