Add maxResolution option to createXYZ()
include maxResolution in options test
This commit is contained in:
@@ -30,9 +30,10 @@ import TileCache from '../TileCache.js';
|
||||
* @property {import("./State.js").default} [state] Source state.
|
||||
* @property {typeof import("../VectorTile.js").default} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link module:ol/VectorTile}.
|
||||
* @property {number} [maxZoom=22] Optional max zoom level.
|
||||
* @property {number} [minZoom] Optional min zoom level.
|
||||
* @property {number|import("../size.js").Size} [tileSize=512] Optional tile size.
|
||||
* @property {number} [maxZoom=22] Optional max zoom level. Not used if `tileGrid` is provided.
|
||||
* @property {number} [minZoom] Optional min zoom level. Not used if `tileGrid` is provided.
|
||||
* @property {number|import("../size.js").Size} [tileSize=512] Optional tile size. 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. Could look like this for pbf tiles:
|
||||
@@ -105,6 +106,7 @@ class VectorTile extends UrlTile {
|
||||
|
||||
const tileGrid = options.tileGrid || createXYZ({
|
||||
extent: extent,
|
||||
maxResolution: options.maxResolution,
|
||||
maxZoom: options.maxZoom !== undefined ? options.maxZoom : 22,
|
||||
minZoom: options.minZoom,
|
||||
tileSize: options.tileSize || 512
|
||||
|
||||
Reference in New Issue
Block a user