Module: ol/source/StadiaMaps

ol/source/StadiaMaps


Classes

StadiaMaps

Type Definitions

Options{Object}

Properties:
Name Type Description
cacheSize number | undefined

Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.

interpolate boolean
(defaults to true)

Use interpolated values when resampling. By default, linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.

layer string

Layer name. Valid values: alidade_smooth, alidade_smooth_dark, outdoors, stamen_terrain, stamen_terrain_background, stamen_terrain_labels, stamen_terrain_lines, stamen_toner_background, stamen_toner, stamen_toner_labels, stamen_toner_lines, stamen_toner_lite, stamen_watercolor, and osm_bright.

minZoom number | undefined

Minimum zoom.

maxZoom number | undefined

Maximum zoom.

reprojectionErrorThreshold number
(defaults to 0.5)

Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.

tileLoadFunction LoadFunction | undefined

Optional function to load a tile given a URL. The default is

function(imageTile, src) {
  imageTile.getImage().src = src;
};
transition number
(defaults to 250)

Duration of the opacity transition for rendering. To disable the opacity transition, pass transition: 0.

url string | undefined

URL template. Must include {x}, {y} or {-y}, and {z} placeholders.

wrapX boolean
(defaults to true)

Whether to wrap the world horizontally.

zDirection number | NearestDirectionFunction
(defaults to 0)

Choose whether to use tiles with a higher or lower zoom level when between integer zoom levels. See getZForResolution.

apiKey string | undefined

Stadia Maps API key. Not required for localhost or most public web deployments. See https://docs.stadiamaps.com/authentication/ for details.

retina boolean | undefined

Use retina tiles (if available; not available for Stamen Watercolor).