Anaconda Enterprise: Documentation

# bokeh.models.map_plots

Models for displaying maps in Bokeh plots.

class `bokeh.models.map_plots.``GMapOptions`(**kwargs)

  Bases: `bokeh.models.map_plots.MapOptions`

  Options for GMapPlot objects.

  `map_type`

    property type: `Enum` ( `MapType` )

    The map type to use for the GMapPlot.

  `scale_control`

    property type: `Bool`

    Whether the Google map should display its distance scale control.

  `styles`

    property type: `JSON`

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

JSON Prototype

    {
      "id": "8a9452c1-ebb1-4edc-98a3-c0e71dc3573f",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "lat": null,
      "lng": null,
      "map_type": "roadmap",
      "name": null,
      "scale_control": false,
      "styles": null,
      "subscribed_events": [],
      "tags": [],
      "zoom": 12
    }

class `bokeh.models.map_plots.``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: `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,
      "aspect_scale": 1,
      "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": "742503c2-0de2-4819-8ac1-3b070853a497",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "left": [],
      "lod_factor": 10,
      "lod_interval": 300,
      "lod_threshold": 2000,
      "lod_timeout": 500,
      "map_options": null,
      "match_aspect": false,
      "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
      },
      "output_backend": "canvas",
      "plot_height": 600,
      "plot_width": 600,
      "renderers": [],
      "right": [],
      "sizing_mode": "fixed",
      "subscribed_events": [],
      "tags": [],
      "title": {
        "id": "1587cc4b-9e7e-4ecc-90fb-73ed4aa645f4",
        "type": "Title"
      },
      "title_location": "above",
      "toolbar": {
        "id": "b1ef8aa7-e25a-46aa-b119-5e716a9ff646",
        "type": "Toolbar"
      },
      "toolbar_location": "right",
      "toolbar_sticky": true,
      "v_symmetry": false,
      "width": null,
      "x_range": null,
      "x_scale": {
        "id": "1e41d873-988a-4a35-8633-34ef997b1ce1",
        "type": "LinearScale"
      },
      "y_range": null,
      "y_scale": {
        "id": "33231d02-fb54-4598-9506-e1463a6ae7e1",
        "type": "LinearScale"
      }
    }

class `bokeh.models.map_plots.``MapOptions`(**kwargs)

  Bases: `bokeh.model.Model`

  Abstract base class for map options’ models.

  Note

  This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

  `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.

JSON Prototype

    {
      "id": "ffa676bf-711b-422f-bcd6-7a3eec42fda3",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "lat": null,
      "lng": null,
      "name": null,
      "subscribed_events": [],
      "tags": [],
      "zoom": 12
    }

class `bokeh.models.map_plots.``MapPlot`(**kwargs)

  Bases: `bokeh.models.plots.Plot`

  Abstract base class for map plot models.

  Note

  This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

JSON Prototype

    {
      "above": [],
      "aspect_scale": 1,
      "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": "ffa48d8d-f8d0-4705-9934-f53e97aec8cd",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "left": [],
      "lod_factor": 10,
      "lod_interval": 300,
      "lod_threshold": 2000,
      "lod_timeout": 500,
      "match_aspect": false,
      "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
      },
      "output_backend": "canvas",
      "plot_height": 600,
      "plot_width": 600,
      "renderers": [],
      "right": [],
      "sizing_mode": "fixed",
      "subscribed_events": [],
      "tags": [],
      "title": {
        "id": "3aefa068-27ad-45d7-ad4b-10b9dc2c43e0",
        "type": "Title"
      },
      "title_location": "above",
      "toolbar": {
        "id": "b0fff34a-468e-4ff1-ac88-3cf3b3ee4967",
        "type": "Toolbar"
      },
      "toolbar_location": "right",
      "toolbar_sticky": true,
      "v_symmetry": false,
      "width": null,
      "x_range": null,
      "x_scale": {
        "id": "be88bab1-816b-4905-9f2a-f46d063f806a",
        "type": "LinearScale"
      },
      "y_range": null,
      "y_scale": {
        "id": "c1bae43b-9676-4d68-9e4e-c16de4c9d1d0",
        "type": "LinearScale"
      }
    }