bokeh.models.tiles

class BBoxTileSource(**kwargs)

Bases: bokeh.models.tiles.MercatorTileSource

The BBoxTileSource has the same default tile origin as the WMTSTileSource but requested tiles use a {XMIN}, {YMIN}, {XMAX}, {YMAX} e.g. http://your.custom.tile.service?bbox={XMIN},{YMIN},{XMAX},{YMAX}.

use_latlon

property type: use_latlon:Bool

Flag which indicates option to output {XMIN},{YMIN},{XMAX},{YMAX} in meters or latitude and longitude.

JSON Prototype
{
  "attribution": "",
  "extra_url_vars": {},
  "id": "f66c620b-fd0b-4c04-bc32-390f368731b2",
  "initial_resolution": 156543.03392804097,
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "use_latlon": false,
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}
class MercatorTileSource(**kwargs)

Bases: bokeh.models.tiles.TileSource

MercatorTileSource is not generally useful to instantiate on its own, but is the parent class of mercator tile services (e.g. WMTSTileSource).

initial_resolution

property type: initial_resolution:Float

resolution (plot_units / pixels) of minimum zoom level of tileset projection. None to auto-compute.

wrap_around

property type: wrap_around:Bool

Enables continuous horizontal panning by wrapping the x-axis based on bounds of map. Note that axis coordinates are not wrapped. To toggle axis label visibility, use plot.axis.visible = False.

x_origin_offset

property type: x_origin_offset:Float

x offset in plot coordinates

y_origin_offset

property type: y_origin_offset:Float

y offset in plot coordinates

JSON Prototype
{
  "attribution": "",
  "extra_url_vars": {},
  "id": "8ade36ee-4ac6-4a8d-b12f-c8479ebc3a4b",
  "initial_resolution": 156543.03392804097,
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}
class QUADKEYTileSource(**kwargs)

Bases: bokeh.models.tiles.MercatorTileSource

The QUADKEYTileSource has the same tile origin as the WMTSTileSource but requests tiles using a quadkey argument instead of X, Y, Z e.g. http://your.quadkey.tile.host/{Q}.png

JSON Prototype
{
  "attribution": "",
  "extra_url_vars": {},
  "id": "96728c04-d0fe-4561-8ff8-d50511910ec9",
  "initial_resolution": 156543.03392804097,
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}
class TMSTileSource(**kwargs)

Bases: bokeh.models.tiles.MercatorTileSource

The TMSTileSource contains tile config info and provides urls for tiles based on a templated url e.g. http://your.tms.server.host/{Z}/{X}/{Y}.png. The defining feature of TMS is the tile-origin in located at the bottom-left.

The TMSTileSource can also be helpful in implementing tile renderers for custom tile sets, including non-spatial datasets.

JSON Prototype
{
  "attribution": "",
  "extra_url_vars": {},
  "id": "fc796769-c2be-496e-ac74-537706f2378a",
  "initial_resolution": 156543.03392804097,
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}
class TileSource(**kwargs)

Bases: bokeh.model.Model

A base class for all tile source types. TileSource is not generally useful to instantiate on its own. In general, tile sources are used as a required input for TileRenderer.

Subclasses should have these properties as well: x_origin_offset = Float y_origin_offset = Float initial_resolution = Float
attribution

property type: attribution:String

Data provider attribution content. This can include HTML content.

extra_url_vars

property type: extra_url_vars:Dict(String, Any)

A dictionary that maps url variable template keys to values. These variables are useful for parts of tile urls which do not change from tile to tile (e.g. server host name, or layer name).

max_zoom

property type: max_zoom:Int

the maximum zoom level for the tile layer. This is the most “zoomed-in” level.

min_zoom

property type: min_zoom:Int

the minimum zoom level for the tile layer. This is the most “zoomed-out” level.

tile_size

property type: tile_size:Int

tile size in pixels (e.g. 256)

url

property type: url:String

tile service url (example: http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png)

JSON Prototype
{
  "attribution": "",
  "extra_url_vars": {},
  "id": "4045b404-818e-4bd5-a70d-082bb417fa32",
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": ""
}
class WMTSTileSource(**kwargs)

Bases: bokeh.models.tiles.MercatorTileSource

The WMTSTileSource behaves much like TMSTileSource but has its tile-origin in the top-left. This is the most common used tile source for web mapping applications. Such companies as Google, MapQuest, Stamen, Esri, and OpenStreetMap provide service which use the WMTS specification e.g. http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png.

JSON Prototype
{
  "attribution": "",
  "extra_url_vars": {},
  "id": "86a0d7e6-5c6f-4b88-a95c-3943c6384382",
  "initial_resolution": 156543.03392804097,
  "max_zoom": 30,
  "min_zoom": 0,
  "name": null,
  "tags": [],
  "tile_size": 256,
  "url": "",
  "wrap_around": true,
  "x_origin_offset": 20037508.34,
  "y_origin_offset": 20037508.34
}