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.

map_options

property type: map_options:Instance(GMapOptions)

Options for displaying the plot.

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,
  "hidpi": true,
  "id": "8dde8909-0291-4f42-8e3e-8d7641fb8916",
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "logo": "normal",
  "map_options": null,
  "min_border": 50,
  "min_border_bottom": 50,
  "min_border_left": 50,
  "min_border_right": 50,
  "min_border_top": 50,
  "name": null,
  "outline_line_alpha": {
    "value": 1.0
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#aaaaaa"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "responsive": false,
  "right": [],
  "tags": [],
  "title": "",
  "title_standoff": 8,
  "title_text_align": "center",
  "title_text_alpha": {
    "value": 1.0
  },
  "title_text_baseline": "alphabetic",
  "title_text_color": {
    "value": "#444444"
  },
  "title_text_font": "helvetica",
  "title_text_font_size": {
    "value": "20pt"
  },
  "title_text_font_style": "normal",
  "tool_events": {
    "id": "265205d0-902b-4a4e-9230-7d959a1df0a5",
    "type": "ToolEvents"
  },
  "toolbar_location": "above",
  "tools": [],
  "v_symmetry": false,
  "webgl": false,
  "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,
  "hidpi": true,
  "id": "5918fe21-3cbd-4a12-b938-07674484a88d",
  "left": [],
  "lod_factor": 10,
  "lod_interval": 300,
  "lod_threshold": 2000,
  "lod_timeout": 500,
  "logo": "normal",
  "min_border": 50,
  "min_border_bottom": 50,
  "min_border_left": 50,
  "min_border_right": 50,
  "min_border_top": 50,
  "name": null,
  "outline_line_alpha": {
    "value": 1.0
  },
  "outline_line_cap": "butt",
  "outline_line_color": {
    "value": "#aaaaaa"
  },
  "outline_line_dash": [],
  "outline_line_dash_offset": 0,
  "outline_line_join": "miter",
  "outline_line_width": {
    "value": 1
  },
  "plot_height": 600,
  "plot_width": 600,
  "renderers": [],
  "responsive": false,
  "right": [],
  "tags": [],
  "title": "",
  "title_standoff": 8,
  "title_text_align": "center",
  "title_text_alpha": {
    "value": 1.0
  },
  "title_text_baseline": "alphabetic",
  "title_text_color": {
    "value": "#444444"
  },
  "title_text_font": "helvetica",
  "title_text_font_size": {
    "value": "20pt"
  },
  "title_text_font_style": "normal",
  "tool_events": {
    "id": "3909c627-4f88-4f4f-8712-351e2df4eca2",
    "type": "ToolEvents"
  },
  "toolbar_location": "above",
  "tools": [],
  "v_symmetry": false,
  "webgl": false,
  "x_mapper_type": "auto",
  "x_range": null,
  "y_mapper_type": "auto",
  "y_range": null
}