bokeh.tile_providers

Pre-configured tile sources for common third party tile services.

get_provider

Use this function to retrieve an instance of a predefined tile provider.

Args:
provider_name (Union[str, Vendors, xyzservices.TileProvider])

Name of the tile provider to supply.

Use a tile_providers.Vendors enumeration value, or the string name of one of the known providers. Use xyzservices.TileProvider to pass custom tile providers.

Returns:

WMTSTileProviderSource: The desired tile provider instance

Raises:

ValueError, if the specified provider can not be found

Example:

>>> from bokeh.tile_providers import get_provider, Vendors
>>> get_provider(Vendors.CARTODBPOSITRON)
<class 'bokeh.models.tiles.WMTSTileSource'>
>>> get_provider('CARTODBPOSITRON')
<class 'bokeh.models.tiles.WMTSTileSource'>

>>> import xyzservices.providers as xyz
>>> get_provider(xyz.CartoDB.Positron)
<class 'bokeh.models.tiles.WMTSTileSource'>

The available built-in tile providers are listed in the Vendors enum:

Vendors = Enumeration(CARTODBPOSITRON, CARTODBPOSI .... ER_LABELS, OSM, WIKIMEDIA, ESRI_IMAGERY)
See all values
Enumeration(CARTODBPOSITRON, CARTODBPOSITRON_RETINA, STAMEN_TERRAIN,

    STAMEN_TERRAIN_RETINA, STAMEN_TONER, STAMEN_TONER_BACKGROUND,

    STAMEN_TONER_LABELS, OSM, WIKIMEDIA, ESRI_IMAGERY)

Any of these values may be be passed to the get_provider function in order to obtain a tile provider to use with a Bokeh plot. Representative samples of each tile provider are shown below.

CARTODBPOSITRON

Tile Source for CartoDB Tile Service

CARTODBPOSITRON_RETINA

Tile Source for CartoDB Tile Service (tiles at ‘retina’ resolution)

ESRI_IMAGERY

Tile Source for ESRI public tiles.

OSM

Tile Source for Open Street Maps.

STAMEN_TERRAIN

Tile Source for Stamen Terrain Service

STAMEN_TERRAIN_RETINA

Tile Source for Stamen Terrain Service (tiles at ‘retina’ resolution)

STAMEN_TONER

Tile Source for Stamen Toner Service

STAMEN_TONER_BACKGROUND

Tile Source for Stamen Toner Background Service which does not include labels

STAMEN_TONER_LABELS

Tile Source for Stamen Toner Service which includes only labels