Classes
Type Definitions
-
Config{Object}
-
Properties:
Name Type Argument Description name
string <optional>
The name.
description
string <optional>
The description.
version
string <optional>
The version.
attribution
string <optional>
The attribution.
template
string <optional>
The template.
legend
string <optional>
The legend.
scheme
string <optional>
The scheme.
tiles
Array.<string> The tile URL templates.
grids
Array.<string> <optional>
Optional grids.
minzoom
number <optional>
Minimum zoom level.
maxzoom
number <optional>
Maximum zoom level.
bounds
Array.<number> <optional>
Optional bounds.
center
Array.<number> <optional>
Optional center.
-
Options{Object}
-
Properties:
Name Type Argument Default Description attributions
module:ol/source/Source~AttributionLike <optional>
Attributions.
cacheSize
number <optional>
2048 Cache size.
crossOrigin
null | string <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you are using the WebGL renderer or 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.jsonp
boolean <optional>
false Use JSONP with callback to load the TileJSON. Useful when the server does not support CORS..
reprojectionErrorThreshold
number <optional>
0.5 Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.
tileJSON
module:ol/source/TileJSON~Config <optional>
TileJSON configuration for this source. If not provided,
url
must be configured.tileLoadFunction
module:ol/Tile~LoadFunction <optional>
Optional function to load a tile given a URL. The default is
function(imageTile, src) { imageTile.getImage().src = src; };
url
string <optional>
URL to the TileJSON file. If not provided,
tileJSON
must be configured.wrapX
boolean <optional>
true Whether to wrap the world horizontally.
transition
number <optional>
Duration of the opacity transition for rendering. To disable the opacity transition, pass
transition: 0
.