Classes
Type Definitions
-
Image tile loading function. The function is called with z, x, and y tile coordinates and returns an
image
or a promise for the same. -
Options{Object}
-
Properties:
Name Type Description url
UrlLike | undefined The image URL template. In addition to a single URL template, an array of URL templates or a function can be provided. If a function is provided, it will be called with z, x, y tile coordinates and loader options and should return a URL.
loader
Loader | undefined Data loader. Called with z, x, and y tile coordinates. Returns an
image
for a tile or a promise for the same. The promise should not resolve until the image is loaded. If theurl
option is provided, a loader will be created.attributions
AttributionLike | undefined Attributions.
attributionsCollapsible
boolean
(defaults to true)Attributions are collapsible.
maxZoom
number
(defaults to 42)Optional max zoom level. Not used if
tileGrid
is provided.minZoom
number
(defaults to 0)Optional min zoom level. Not used if
tileGrid
is provided.tileSize
number | Size
(defaults to [256, 256])The pixel width and height of the source tiles. This may be different than the rendered pixel size if a
tileGrid
is provided.gutter
number
(defaults to 0)The size in pixels of the gutter around data tiles to ignore. This allows artifacts of rendering at tile edges to be ignored. Supported data should be wider and taller than the tile size by a value of
2 x gutter
.maxResolution
number | undefined Optional tile grid resolution at level zero. Not used if
tileGrid
is provided.projection
ProjectionLike
(defaults to 'EPSG:3857')Tile projection.
tileGrid
TileGrid | undefined Tile grid.
state
State | undefined The source state.
wrapX
boolean
(defaults to true)Render tiles beyond the antimeridian.
transition
number | undefined Transition time when fading in new tiles (in miliseconds).
interpolate
boolean
(defaults to true)Use interpolated values when resampling.
crossOrigin
CrossOriginAttribute
(defaults to 'anonymous')The crossOrigin property to pass to loaders for image data.
-
-
UrlLike{string} {Array.<string>} {UrlGetter}
-