Add zDirection to options

This commit is contained in:
mike-000
2021-07-03 11:13:19 +01:00
parent 07ea4ac1c8
commit ddf7ac6e42
9 changed files with 36 additions and 0 deletions

View File

@@ -66,6 +66,9 @@ const TOS_ATTRIBUTION =
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number} [transition] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -129,6 +132,7 @@ class BingMaps extends TileImage {
tilePixelRatio: hidpi ? 2 : 1,
wrapX: options.wrapX !== undefined ? options.wrapX : true,
transition: options.transition,
zDirection: options.zDirection,
});
/**

View File

@@ -29,6 +29,9 @@ import {assign} from '../obj.js';
* @property {string} [account] Username as used to access public Carto dashboard at https://{username}.carto.com/.
* @property {number} [transition=250] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -56,6 +59,7 @@ class CartoDB extends XYZ {
projection: options.projection,
transition: options.transition,
wrapX: options.wrapX,
zDirection: options.zDirection,
});
/**

View File

@@ -39,6 +39,9 @@ export const ATTRIBUTION =
* @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.
* Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -81,6 +84,7 @@ class OSM extends XYZ {
transition: options.transition,
url: url,
wrapX: options.wrapX,
zDirection: options.zDirection,
});
}
}

View File

@@ -104,6 +104,9 @@ const ProviderConfig = {
* To disable the opacity transition, pass `transition: 0`.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -145,6 +148,7 @@ class Stamen extends XYZ {
transition: options.transition,
url: url,
wrapX: options.wrapX,
zDirection: options.zDirection,
});
}
}

View File

@@ -51,6 +51,9 @@ import {hash as tileCoordHash} from '../tilecoord.js';
* transition, pass `transition: 0`.
* @property {Array<string>} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS
* Service supports multiple urls for export requests.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -82,6 +85,7 @@ class TileArcGISRest extends TileImage {
urls: options.urls,
wrapX: options.wrapX !== undefined ? options.wrapX : true,
transition: options.transition,
zDirection: options.zDirection,
});
/**

View File

@@ -59,6 +59,9 @@ import {jsonp as requestJSONP} from '../net.js';
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
* @property {number} [transition] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -82,6 +85,7 @@ class TileJSON extends TileImage {
tileLoadFunction: options.tileLoadFunction,
wrapX: options.wrapX !== undefined ? options.wrapX : true,
transition: options.transition,
zDirection: options.zDirection,
});
/**

View File

@@ -69,6 +69,9 @@ import {hash as tileCoordHash} from '../tilecoord.js';
* but they will be wrapped horizontally to render multiple worlds.
* @property {number} [transition] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -103,6 +106,7 @@ class TileWMS extends TileImage {
urls: options.urls,
wrapX: options.wrapX !== undefined ? options.wrapX : true,
transition: options.transition,
zDirection: options.zDirection,
});
/**

View File

@@ -268,6 +268,9 @@ export class CustomTile extends Tile {
* If not provided, `url` must be configured.
* @property {string} [url] TileJSON endpoint that provides the configuration for this source.
* Request will be made through JSONP. If not provided, `tileJSON` must be configured.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -283,6 +286,7 @@ class UTFGrid extends TileSource {
super({
projection: getProjection('EPSG:3857'),
state: SourceState.LOADING,
zDirection: options.zDirection,
});
/**

View File

@@ -54,6 +54,9 @@ import {find, findIndex, includes} from '../array.js';
* @property {boolean} [wrapX=false] Whether to wrap the world horizontally.
* @property {number} [transition] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`.
* @property {number|import("../array.js").NearestDirectionFunction} [zDirection=0]
* Choose whether to use tiles with a higher or lower zoom level when between integer
* zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.
*/
/**
@@ -99,6 +102,7 @@ class WMTS extends TileImage {
urls: urls,
wrapX: options.wrapX !== undefined ? options.wrapX : false,
transition: options.transition,
zDirection: options.zDirection,
});
/**