bokeh.models.map_plots

Models for displaying maps in Bokeh plots.

class GMapOptions(**properties)[source]

Options for GMapPlot objects.

map_type

property type: Enum ( MapType )

The map type to use for the GMapPlot.

styles

property type: JSON

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

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": "31ce958b-d46f-45f5-bff0-f7733b96c068",
  "js_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",
  "tags": [],
  "title": {
    "id": "0ad75306-01df-464e-8834-7d8715bbc921",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "5e0784cc-c554-4704-82ea-aad9e88e443f",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "2e328aad-0710-4476-9e54-3b9534c72578",
    "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)[source]

Abstract base class for map options’ models.

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.

class MapPlot(**kwargs)[source]

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"
  },
  "css_classes": null,
  "disabled": false,
  "extra_x_ranges": {},
  "extra_y_ranges": {},
  "h_symmetry": true,
  "height": null,
  "hidpi": true,
  "id": "9f944fe3-d6c5-4de0-909c-94fc3707344b",
  "js_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",
  "tags": [],
  "title": {
    "id": "985d4472-142e-45a8-89cd-9725d2d152ca",
    "type": "Title"
  },
  "title_location": "above",
  "tool_events": {
    "id": "25fba919-7e74-461e-814d-40d3b635642e",
    "type": "ToolEvents"
  },
  "toolbar": {
    "id": "458aa4b7-353f-478c-9666-a0975247ea56",
    "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
}