Classes
Type Definitions
-
Config{Object}
-
Properties:
Name Type Argument Description namestring <optional>
The name.
descriptionstring <optional>
The description.
versionstring <optional>
The version.
attributionstring <optional>
The attribution.
templatestring <optional>
The template.
legendstring <optional>
The legend.
schemestring <optional>
The scheme.
tilesArray.<string> The tile URL templates.
gridsArray.<string> <optional>
Optional grids.
minzoomnumber <optional>
Minimum zoom level.
maxzoomnumber <optional>
Maximum zoom level.
boundsArray.<number> <optional>
Optional bounds.
centerArray.<number> <optional>
Optional center.
-
Options{Object}
-
Properties:
Name Type Argument Default Description attributionsmodule:ol/source/Source~AttributionLike <optional>
Attributions.
cacheSizenumber <optional>
Tile cache size. The default depends on the screen size. Will be ignored if too small.
crossOriginnull | string <optional>
The
crossOriginattribute for loaded images. Note that you must provide acrossOriginvalue if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.jsonpboolean <optional>
false Use JSONP with callback to load the TileJSON. Useful when the server does not support CORS..
reprojectionErrorThresholdnumber <optional>
0.5 Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.
tileJSONmodule:ol/source/TileJSON~Config <optional>
TileJSON configuration for this source. If not provided,
urlmust be configured.tileLoadFunctionmodule:ol/Tile~LoadFunction <optional>
Optional function to load a tile given a URL. The default is
function(imageTile, src) { imageTile.getImage().src = src; };tileSizenumber | module:ol/size~Size <optional>
[256, 256] The tile size used by the tile service. Note:
tileSizeand other non-standard TileJSON properties are currently ignored.urlstring <optional>
URL to the TileJSON file. If not provided,
tileJSONmust be configured.wrapXboolean <optional>
true Whether to wrap the world horizontally.
transitionnumber <optional>
Duration of the opacity transition for rendering. To disable the opacity transition, pass
transition: 0.
OpenLayers