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": "31c09535-27f6-4643-9c8c-bd3492eb6a63",
  "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": "cf7bafda-4b36-4ac8-a498-5d08f471af0d",
    "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": "2e5c0bbd-4f02-40b8-bcbb-81df8737dc6a",
  "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": "d65a6886-fbbe-445b-9ea6-c12039b633da",
    "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
}