Merge branch 'master' into patch-4
This commit is contained in:
@@ -9,7 +9,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* @typedef {Object} Options
|
||||
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
|
||||
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
||||
* @property {number} [cacheSize] Tile cache size. The default depends on the screen size. Will increase if too small.
|
||||
* @property {number} [cacheSize] Tile cache size. The default depends on the screen size. Will be ignored if too small.
|
||||
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that
|
||||
* you must provide a `crossOrigin` value 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.
|
||||
@@ -19,8 +19,9 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Higher values can increase reprojection performance, but decrease precision.
|
||||
* @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used
|
||||
* for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing.
|
||||
* @property {number} [maxZoom=18] Optional max zoom level.
|
||||
* @property {number} [minZoom=0] Optional min zoom level.
|
||||
* @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.
|
||||
* @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.
|
||||
* @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.
|
||||
* @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
|
||||
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is
|
||||
* ```js
|
||||
@@ -33,9 +34,10 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
|
||||
* should be set to `2`.
|
||||
* @property {number|import("../size.js").Size} [tileSize=[256, 256]] The tile size used by the tile service.
|
||||
* Not used if `tileGrid` is provided.
|
||||
* @property {import("../Tile.js").UrlFunction} [tileUrlFunction] Optional function to get
|
||||
* tile URL given a tile coordinate and the projection.
|
||||
* Required if url or urls are not provided.
|
||||
* Required if `url` or `urls` are not provided.
|
||||
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,
|
||||
* and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,
|
||||
* may be used instead of defining each one separately in the `urls` option.
|
||||
@@ -80,6 +82,7 @@ class XYZ extends TileImage {
|
||||
const tileGrid = options.tileGrid !== undefined ? options.tileGrid :
|
||||
createXYZ({
|
||||
extent: extentFromProjection(projection),
|
||||
maxResolution: options.maxResolution,
|
||||
maxZoom: options.maxZoom,
|
||||
minZoom: options.minZoom,
|
||||
tileSize: options.tileSize
|
||||
|
||||
Reference in New Issue
Block a user