This commit is contained in:
357
node_modules/ol/tilegrid/TileGrid.d.ts
generated
vendored
Normal file
357
node_modules/ol/tilegrid/TileGrid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,357 @@
|
||||
export default TileGrid;
|
||||
export type Options = {
|
||||
/**
|
||||
* Extent for the tile grid. No tiles outside this
|
||||
* extent will be requested by {@link module :ol/source/Tile~TileSource} sources. When no `origin` or
|
||||
* `origins` are configured, the `origin` will be set to the top-left corner of the extent.
|
||||
*/
|
||||
extent?: import("../extent.js").Extent | undefined;
|
||||
/**
|
||||
* Minimum zoom.
|
||||
*/
|
||||
minZoom?: number | undefined;
|
||||
/**
|
||||
* The tile grid origin, i.e. where the `x`
|
||||
* and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not
|
||||
* specified, `extent` or `origins` must be provided.
|
||||
*/
|
||||
origin?: import("../coordinate.js").Coordinate | undefined;
|
||||
/**
|
||||
* Tile grid origins, i.e. where
|
||||
* the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length
|
||||
* should match the length of the `resolutions` array, i.e. each resolution can have a different
|
||||
* origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or
|
||||
* `origin` must be provided.
|
||||
*/
|
||||
origins?: import("../coordinate.js").Coordinate[] | undefined;
|
||||
/**
|
||||
* Resolutions. The array index of each resolution needs
|
||||
* to match the zoom level. This means that even if a `minZoom` is configured, the resolutions
|
||||
* array will have a length of `maxZoom + 1`.
|
||||
*/
|
||||
resolutions: Array<number>;
|
||||
/**
|
||||
* Number of tile rows and columns
|
||||
* of the grid for each zoom level. If specified the values
|
||||
* define each zoom level's extent together with the `origin` or `origins`.
|
||||
* A grid `extent` can be configured in addition, and will further limit the extent
|
||||
* for which tile requests are made by sources. If the bottom-left corner of
|
||||
* an extent is used as `origin` or `origins`, then the `y` value must be
|
||||
* negative because OpenLayers tile coordinates use the top left as the origin.
|
||||
*/
|
||||
sizes?: import("../size.js").Size[] | undefined;
|
||||
/**
|
||||
* Tile size.
|
||||
* Default is `[256, 256]`.
|
||||
*/
|
||||
tileSize?: number | import("../size.js").Size | undefined;
|
||||
/**
|
||||
* Tile sizes. If given, the array length
|
||||
* should match the length of the `resolutions` array, i.e. each resolution can have a different
|
||||
* tile size.
|
||||
*/
|
||||
tileSizes?: (number | import("../size.js").Size)[] | undefined;
|
||||
};
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {import("../extent.js").Extent} [extent] Extent for the tile grid. No tiles outside this
|
||||
* extent will be requested by {@link module:ol/source/Tile~TileSource} sources. When no `origin` or
|
||||
* `origins` are configured, the `origin` will be set to the top-left corner of the extent.
|
||||
* @property {number} [minZoom=0] Minimum zoom.
|
||||
* @property {import("../coordinate.js").Coordinate} [origin] The tile grid origin, i.e. where the `x`
|
||||
* and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not
|
||||
* specified, `extent` or `origins` must be provided.
|
||||
* @property {Array<import("../coordinate.js").Coordinate>} [origins] Tile grid origins, i.e. where
|
||||
* the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length
|
||||
* should match the length of the `resolutions` array, i.e. each resolution can have a different
|
||||
* origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or
|
||||
* `origin` must be provided.
|
||||
* @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs
|
||||
* to match the zoom level. This means that even if a `minZoom` is configured, the resolutions
|
||||
* array will have a length of `maxZoom + 1`.
|
||||
* @property {Array<import("../size.js").Size>} [sizes] Number of tile rows and columns
|
||||
* of the grid for each zoom level. If specified the values
|
||||
* define each zoom level's extent together with the `origin` or `origins`.
|
||||
* A grid `extent` can be configured in addition, and will further limit the extent
|
||||
* for which tile requests are made by sources. If the bottom-left corner of
|
||||
* an extent is used as `origin` or `origins`, then the `y` value must be
|
||||
* negative because OpenLayers tile coordinates use the top left as the origin.
|
||||
* @property {number|import("../size.js").Size} [tileSize] Tile size.
|
||||
* Default is `[256, 256]`.
|
||||
* @property {Array<number|import("../size.js").Size>} [tileSizes] Tile sizes. If given, the array length
|
||||
* should match the length of the `resolutions` array, i.e. each resolution can have a different
|
||||
* tile size.
|
||||
*/
|
||||
/**
|
||||
* @classdesc
|
||||
* Base class for setting the grid pattern for sources accessing tiled-image
|
||||
* servers.
|
||||
* @api
|
||||
*/
|
||||
declare class TileGrid {
|
||||
/**
|
||||
* @param {Options} options Tile grid options.
|
||||
*/
|
||||
constructor(options: Options);
|
||||
/**
|
||||
* @protected
|
||||
* @type {number}
|
||||
*/
|
||||
protected minZoom: number;
|
||||
/**
|
||||
* @private
|
||||
* @type {!Array<number>}
|
||||
*/
|
||||
private resolutions_;
|
||||
/**
|
||||
* @private
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
private zoomFactor_;
|
||||
/**
|
||||
* @protected
|
||||
* @type {number}
|
||||
*/
|
||||
protected maxZoom: number;
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../coordinate.js").Coordinate|null}
|
||||
*/
|
||||
private origin_;
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<import("../coordinate.js").Coordinate>}
|
||||
*/
|
||||
private origins_;
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<number|import("../size.js").Size>}
|
||||
*/
|
||||
private tileSizes_;
|
||||
/**
|
||||
* @private
|
||||
* @type {number|import("../size.js").Size}
|
||||
*/
|
||||
private tileSize_;
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../extent.js").Extent}
|
||||
*/
|
||||
private extent_;
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<import("../TileRange.js").default>}
|
||||
*/
|
||||
private fullTileRanges_;
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../size.js").Size}
|
||||
*/
|
||||
private tmpSize_;
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../extent.js").Extent}
|
||||
*/
|
||||
private tmpExtent_;
|
||||
/**
|
||||
* Call a function with each tile coordinate for a given extent and zoom level.
|
||||
*
|
||||
* @param {import("../extent.js").Extent} extent Extent.
|
||||
* @param {number} zoom Integer zoom level.
|
||||
* @param {function(import("../tilecoord.js").TileCoord): void} callback Function called with each tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
forEachTileCoord(extent: import("../extent.js").Extent, zoom: number, callback: (arg0: import("../tilecoord.js").TileCoord) => void): void;
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {function(number, import("../TileRange.js").default): boolean} callback Callback.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary import("../TileRange.js").default object.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary import("../extent.js").Extent object.
|
||||
* @return {boolean} Callback succeeded.
|
||||
*/
|
||||
forEachTileCoordParentTileRange(tileCoord: import("../tilecoord.js").TileCoord, callback: (arg0: number, arg1: import("../TileRange.js").default) => boolean, opt_tileRange?: TileRange | undefined, opt_extent?: import("../extent.js").Extent | undefined): boolean;
|
||||
/**
|
||||
* Get the extent for this tile grid, if it was configured.
|
||||
* @return {import("../extent.js").Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
getExtent(): import("../extent.js").Extent;
|
||||
/**
|
||||
* Get the maximum zoom level for the grid.
|
||||
* @return {number} Max zoom.
|
||||
* @api
|
||||
*/
|
||||
getMaxZoom(): number;
|
||||
/**
|
||||
* Get the minimum zoom level for the grid.
|
||||
* @return {number} Min zoom.
|
||||
* @api
|
||||
*/
|
||||
getMinZoom(): number;
|
||||
/**
|
||||
* Get the origin for the grid at the given zoom level.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @return {import("../coordinate.js").Coordinate} Origin.
|
||||
* @api
|
||||
*/
|
||||
getOrigin(z: number): import("../coordinate.js").Coordinate;
|
||||
/**
|
||||
* Get the resolution for the given zoom level.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @return {number} Resolution.
|
||||
* @api
|
||||
*/
|
||||
getResolution(z: number): number;
|
||||
/**
|
||||
* Get the list of resolutions for the tile grid.
|
||||
* @return {Array<number>} Resolutions.
|
||||
* @api
|
||||
*/
|
||||
getResolutions(): Array<number>;
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary import("../TileRange.js").default object.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary import("../extent.js").Extent object.
|
||||
* @return {import("../TileRange.js").default|null} Tile range.
|
||||
*/
|
||||
getTileCoordChildTileRange(tileCoord: import("../tilecoord.js").TileCoord, opt_tileRange?: TileRange | undefined, opt_extent?: import("../extent.js").Extent | undefined): import("../TileRange.js").default | null;
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary import("../TileRange.js").default object.
|
||||
* @return {import("../TileRange.js").default|null} Tile range.
|
||||
*/
|
||||
getTileRangeForTileCoordAndZ(tileCoord: import("../tilecoord.js").TileCoord, z: number, opt_tileRange?: TileRange | undefined): import("../TileRange.js").default | null;
|
||||
/**
|
||||
* Get the extent for a tile range.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {import("../TileRange.js").default} tileRange Tile range.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary import("../extent.js").Extent object.
|
||||
* @return {import("../extent.js").Extent} Extent.
|
||||
*/
|
||||
getTileRangeExtent(z: number, tileRange: import("../TileRange.js").default, opt_extent?: import("../extent.js").Extent | undefined): import("../extent.js").Extent;
|
||||
/**
|
||||
* Get a tile range for the given extent and integer zoom level.
|
||||
* @param {import("../extent.js").Extent} extent Extent.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary tile range object.
|
||||
* @return {import("../TileRange.js").default} Tile range.
|
||||
*/
|
||||
getTileRangeForExtentAndZ(extent: import("../extent.js").Extent, z: number, opt_tileRange?: TileRange | undefined): import("../TileRange.js").default;
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @return {import("../coordinate.js").Coordinate} Tile center.
|
||||
*/
|
||||
getTileCoordCenter(tileCoord: import("../tilecoord.js").TileCoord): import("../coordinate.js").Coordinate;
|
||||
/**
|
||||
* Get the extent of a tile coordinate.
|
||||
*
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary extent object.
|
||||
* @return {import("../extent.js").Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
getTileCoordExtent(tileCoord: import("../tilecoord.js").TileCoord, opt_extent?: import("../extent.js").Extent | undefined): import("../extent.js").Extent;
|
||||
/**
|
||||
* Get the tile coordinate for the given map coordinate and resolution. This
|
||||
* method considers that coordinates that intersect tile boundaries should be
|
||||
* assigned the higher tile coordinate.
|
||||
*
|
||||
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Destination import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
getTileCoordForCoordAndResolution(coordinate: import("../coordinate.js").Coordinate, resolution: number, opt_tileCoord?: import("../tilecoord.js").TileCoord | undefined): import("../tilecoord.js").TileCoord;
|
||||
/**
|
||||
* Note that this method should not be called for resolutions that correspond
|
||||
* to an integer zoom level. Instead call the `getTileCoordForXYAndZ_` method.
|
||||
* @param {number} x X.
|
||||
* @param {number} y Y.
|
||||
* @param {number} resolution Resolution (for a non-integer zoom level).
|
||||
* @param {boolean} reverseIntersectionPolicy Instead of letting edge
|
||||
* intersections go to the higher tile coordinate, let edge intersections
|
||||
* go to the lower tile coordinate.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @private
|
||||
*/
|
||||
private getTileCoordForXYAndResolution_;
|
||||
/**
|
||||
* Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
|
||||
* they should have separate implementations. This method is for integer zoom
|
||||
* levels. The other method should only be called for resolutions corresponding
|
||||
* to non-integer zoom levels.
|
||||
* @param {number} x Map x coordinate.
|
||||
* @param {number} y Map y coordinate.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {boolean} reverseIntersectionPolicy Instead of letting edge
|
||||
* intersections go to the higher tile coordinate, let edge intersections
|
||||
* go to the lower tile coordinate.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @private
|
||||
*/
|
||||
private getTileCoordForXYAndZ_;
|
||||
/**
|
||||
* Get a tile coordinate given a map coordinate and zoom level.
|
||||
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
||||
* @param {number} z Zoom level.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Destination import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
getTileCoordForCoordAndZ(coordinate: import("../coordinate.js").Coordinate, z: number, opt_tileCoord?: import("../tilecoord.js").TileCoord | undefined): import("../tilecoord.js").TileCoord;
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @return {number} Tile resolution.
|
||||
*/
|
||||
getTileCoordResolution(tileCoord: import("../tilecoord.js").TileCoord): number;
|
||||
/**
|
||||
* Get the tile size for a zoom level. The type of the return value matches the
|
||||
* `tileSize` or `tileSizes` that the tile grid was configured with. To always
|
||||
* get an {@link import("../size.js").Size}, run the result through {@link module:ol/size.toSize}.
|
||||
* @param {number} z Z.
|
||||
* @return {number|import("../size.js").Size} Tile size.
|
||||
* @api
|
||||
*/
|
||||
getTileSize(z: number): number | import("../size.js").Size;
|
||||
/**
|
||||
* @param {number} z Zoom level.
|
||||
* @return {import("../TileRange.js").default} Extent tile range for the specified zoom level.
|
||||
*/
|
||||
getFullTileRange(z: number): import("../TileRange.js").default;
|
||||
/**
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number|import("../array.js").NearestDirectionFunction} [opt_direction]
|
||||
* If 0, the nearest resolution will be used.
|
||||
* If 1, the nearest higher resolution (lower Z) will be used. If -1, the
|
||||
* nearest lower resolution (higher Z) will be used. Default is 0.
|
||||
* Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.
|
||||
*
|
||||
* For example to change tile Z at the midpoint of zoom levels
|
||||
* ```js
|
||||
* function(value, high, low) {
|
||||
* return value - low * Math.sqrt(high / low);
|
||||
* }
|
||||
* ```
|
||||
* @return {number} Z.
|
||||
* @api
|
||||
*/
|
||||
getZForResolution(resolution: number, opt_direction?: number | import("../array.js").NearestDirectionFunction | undefined): number;
|
||||
/**
|
||||
* The tile with the provided tile coordinate intersects the given viewport.
|
||||
* @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.
|
||||
* @param {Array<number>} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.
|
||||
* @return {boolean} The tile with the provided tile coordinate intersects the given viewport.
|
||||
*/
|
||||
tileCoordIntersectsViewport(tileCoord: import('../tilecoord.js').TileCoord, viewport: Array<number>): boolean;
|
||||
/**
|
||||
* @param {!import("../extent.js").Extent} extent Extent for this tile grid.
|
||||
* @private
|
||||
*/
|
||||
private calculateTileRanges_;
|
||||
}
|
||||
import TileRange from "../TileRange.js";
|
||||
//# sourceMappingURL=TileGrid.d.ts.map
|
||||
1
node_modules/ol/tilegrid/TileGrid.d.ts.map
generated
vendored
Normal file
1
node_modules/ol/tilegrid/TileGrid.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TileGrid.d.ts","sourceRoot":"","sources":["../src/tilegrid/TileGrid.js"],"names":[],"mappings":";;;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CACF"}
|
||||
563
node_modules/ol/tilegrid/TileGrid.js
generated
vendored
Normal file
563
node_modules/ol/tilegrid/TileGrid.js
generated
vendored
Normal file
@@ -0,0 +1,563 @@
|
||||
/**
|
||||
* @module ol/tilegrid/TileGrid
|
||||
*/
|
||||
import TileRange, { createOrUpdate as createOrUpdateTileRange, } from '../TileRange.js';
|
||||
import { DEFAULT_TILE_SIZE } from './common.js';
|
||||
import { assert } from '../asserts.js';
|
||||
import { ceil, clamp, floor } from '../math.js';
|
||||
import { createOrUpdate, getTopLeft } from '../extent.js';
|
||||
import { createOrUpdate as createOrUpdateTileCoord } from '../tilecoord.js';
|
||||
import { intersectsLinearRing } from '../geom/flat/intersectsextent.js';
|
||||
import { isSorted, linearFindNearest } from '../array.js';
|
||||
import { toSize } from '../size.js';
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../tilecoord.js").TileCoord}
|
||||
*/
|
||||
var tmpTileCoord = [0, 0, 0];
|
||||
/**
|
||||
* Number of decimal digits to consider in integer values when rounding.
|
||||
* @type {number}
|
||||
*/
|
||||
var DECIMALS = 5;
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {import("../extent.js").Extent} [extent] Extent for the tile grid. No tiles outside this
|
||||
* extent will be requested by {@link module:ol/source/Tile~TileSource} sources. When no `origin` or
|
||||
* `origins` are configured, the `origin` will be set to the top-left corner of the extent.
|
||||
* @property {number} [minZoom=0] Minimum zoom.
|
||||
* @property {import("../coordinate.js").Coordinate} [origin] The tile grid origin, i.e. where the `x`
|
||||
* and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not
|
||||
* specified, `extent` or `origins` must be provided.
|
||||
* @property {Array<import("../coordinate.js").Coordinate>} [origins] Tile grid origins, i.e. where
|
||||
* the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length
|
||||
* should match the length of the `resolutions` array, i.e. each resolution can have a different
|
||||
* origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or
|
||||
* `origin` must be provided.
|
||||
* @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs
|
||||
* to match the zoom level. This means that even if a `minZoom` is configured, the resolutions
|
||||
* array will have a length of `maxZoom + 1`.
|
||||
* @property {Array<import("../size.js").Size>} [sizes] Number of tile rows and columns
|
||||
* of the grid for each zoom level. If specified the values
|
||||
* define each zoom level's extent together with the `origin` or `origins`.
|
||||
* A grid `extent` can be configured in addition, and will further limit the extent
|
||||
* for which tile requests are made by sources. If the bottom-left corner of
|
||||
* an extent is used as `origin` or `origins`, then the `y` value must be
|
||||
* negative because OpenLayers tile coordinates use the top left as the origin.
|
||||
* @property {number|import("../size.js").Size} [tileSize] Tile size.
|
||||
* Default is `[256, 256]`.
|
||||
* @property {Array<number|import("../size.js").Size>} [tileSizes] Tile sizes. If given, the array length
|
||||
* should match the length of the `resolutions` array, i.e. each resolution can have a different
|
||||
* tile size.
|
||||
*/
|
||||
/**
|
||||
* @classdesc
|
||||
* Base class for setting the grid pattern for sources accessing tiled-image
|
||||
* servers.
|
||||
* @api
|
||||
*/
|
||||
var TileGrid = /** @class */ (function () {
|
||||
/**
|
||||
* @param {Options} options Tile grid options.
|
||||
*/
|
||||
function TileGrid(options) {
|
||||
/**
|
||||
* @protected
|
||||
* @type {number}
|
||||
*/
|
||||
this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;
|
||||
/**
|
||||
* @private
|
||||
* @type {!Array<number>}
|
||||
*/
|
||||
this.resolutions_ = options.resolutions;
|
||||
assert(isSorted(this.resolutions_, function (a, b) {
|
||||
return b - a;
|
||||
}, true), 17); // `resolutions` must be sorted in descending order
|
||||
// check if we've got a consistent zoom factor and origin
|
||||
var zoomFactor;
|
||||
if (!options.origins) {
|
||||
for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {
|
||||
if (!zoomFactor) {
|
||||
zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];
|
||||
}
|
||||
else {
|
||||
if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {
|
||||
zoomFactor = undefined;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
* @type {number|undefined}
|
||||
*/
|
||||
this.zoomFactor_ = zoomFactor;
|
||||
/**
|
||||
* @protected
|
||||
* @type {number}
|
||||
*/
|
||||
this.maxZoom = this.resolutions_.length - 1;
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../coordinate.js").Coordinate|null}
|
||||
*/
|
||||
this.origin_ = options.origin !== undefined ? options.origin : null;
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<import("../coordinate.js").Coordinate>}
|
||||
*/
|
||||
this.origins_ = null;
|
||||
if (options.origins !== undefined) {
|
||||
this.origins_ = options.origins;
|
||||
assert(this.origins_.length == this.resolutions_.length, 20); // Number of `origins` and `resolutions` must be equal
|
||||
}
|
||||
var extent = options.extent;
|
||||
if (extent !== undefined && !this.origin_ && !this.origins_) {
|
||||
this.origin_ = getTopLeft(extent);
|
||||
}
|
||||
assert((!this.origin_ && this.origins_) || (this.origin_ && !this.origins_), 18); // Either `origin` or `origins` must be configured, never both
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<number|import("../size.js").Size>}
|
||||
*/
|
||||
this.tileSizes_ = null;
|
||||
if (options.tileSizes !== undefined) {
|
||||
this.tileSizes_ = options.tileSizes;
|
||||
assert(this.tileSizes_.length == this.resolutions_.length, 19); // Number of `tileSizes` and `resolutions` must be equal
|
||||
}
|
||||
/**
|
||||
* @private
|
||||
* @type {number|import("../size.js").Size}
|
||||
*/
|
||||
this.tileSize_ =
|
||||
options.tileSize !== undefined
|
||||
? options.tileSize
|
||||
: !this.tileSizes_
|
||||
? DEFAULT_TILE_SIZE
|
||||
: null;
|
||||
assert((!this.tileSize_ && this.tileSizes_) ||
|
||||
(this.tileSize_ && !this.tileSizes_), 22); // Either `tileSize` or `tileSizes` must be configured, never both
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../extent.js").Extent}
|
||||
*/
|
||||
this.extent_ = extent !== undefined ? extent : null;
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<import("../TileRange.js").default>}
|
||||
*/
|
||||
this.fullTileRanges_ = null;
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../size.js").Size}
|
||||
*/
|
||||
this.tmpSize_ = [0, 0];
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../extent.js").Extent}
|
||||
*/
|
||||
this.tmpExtent_ = [0, 0, 0, 0];
|
||||
if (options.sizes !== undefined) {
|
||||
this.fullTileRanges_ = options.sizes.map(function (size, z) {
|
||||
var tileRange = new TileRange(Math.min(0, size[0]), Math.max(size[0] - 1, -1), Math.min(0, size[1]), Math.max(size[1] - 1, -1));
|
||||
if (extent) {
|
||||
var restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);
|
||||
tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);
|
||||
tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);
|
||||
tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);
|
||||
tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);
|
||||
}
|
||||
return tileRange;
|
||||
}, this);
|
||||
}
|
||||
else if (extent) {
|
||||
this.calculateTileRanges_(extent);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Call a function with each tile coordinate for a given extent and zoom level.
|
||||
*
|
||||
* @param {import("../extent.js").Extent} extent Extent.
|
||||
* @param {number} zoom Integer zoom level.
|
||||
* @param {function(import("../tilecoord.js").TileCoord): void} callback Function called with each tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.forEachTileCoord = function (extent, zoom, callback) {
|
||||
var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);
|
||||
for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {
|
||||
for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {
|
||||
callback([zoom, i, j]);
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {function(number, import("../TileRange.js").default): boolean} callback Callback.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary import("../TileRange.js").default object.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary import("../extent.js").Extent object.
|
||||
* @return {boolean} Callback succeeded.
|
||||
*/
|
||||
TileGrid.prototype.forEachTileCoordParentTileRange = function (tileCoord, callback, opt_tileRange, opt_extent) {
|
||||
var tileRange, x, y;
|
||||
var tileCoordExtent = null;
|
||||
var z = tileCoord[0] - 1;
|
||||
if (this.zoomFactor_ === 2) {
|
||||
x = tileCoord[1];
|
||||
y = tileCoord[2];
|
||||
}
|
||||
else {
|
||||
tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);
|
||||
}
|
||||
while (z >= this.minZoom) {
|
||||
if (this.zoomFactor_ === 2) {
|
||||
x = Math.floor(x / 2);
|
||||
y = Math.floor(y / 2);
|
||||
tileRange = createOrUpdateTileRange(x, x, y, y, opt_tileRange);
|
||||
}
|
||||
else {
|
||||
tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);
|
||||
}
|
||||
if (callback(z, tileRange)) {
|
||||
return true;
|
||||
}
|
||||
--z;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
/**
|
||||
* Get the extent for this tile grid, if it was configured.
|
||||
* @return {import("../extent.js").Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getExtent = function () {
|
||||
return this.extent_;
|
||||
};
|
||||
/**
|
||||
* Get the maximum zoom level for the grid.
|
||||
* @return {number} Max zoom.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getMaxZoom = function () {
|
||||
return this.maxZoom;
|
||||
};
|
||||
/**
|
||||
* Get the minimum zoom level for the grid.
|
||||
* @return {number} Min zoom.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getMinZoom = function () {
|
||||
return this.minZoom;
|
||||
};
|
||||
/**
|
||||
* Get the origin for the grid at the given zoom level.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @return {import("../coordinate.js").Coordinate} Origin.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getOrigin = function (z) {
|
||||
if (this.origin_) {
|
||||
return this.origin_;
|
||||
}
|
||||
else {
|
||||
return this.origins_[z];
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Get the resolution for the given zoom level.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @return {number} Resolution.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getResolution = function (z) {
|
||||
return this.resolutions_[z];
|
||||
};
|
||||
/**
|
||||
* Get the list of resolutions for the tile grid.
|
||||
* @return {Array<number>} Resolutions.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getResolutions = function () {
|
||||
return this.resolutions_;
|
||||
};
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary import("../TileRange.js").default object.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary import("../extent.js").Extent object.
|
||||
* @return {import("../TileRange.js").default|null} Tile range.
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordChildTileRange = function (tileCoord, opt_tileRange, opt_extent) {
|
||||
if (tileCoord[0] < this.maxZoom) {
|
||||
if (this.zoomFactor_ === 2) {
|
||||
var minX = tileCoord[1] * 2;
|
||||
var minY = tileCoord[2] * 2;
|
||||
return createOrUpdateTileRange(minX, minX + 1, minY, minY + 1, opt_tileRange);
|
||||
}
|
||||
var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent || this.tmpExtent_);
|
||||
return this.getTileRangeForExtentAndZ(tileCoordExtent, tileCoord[0] + 1, opt_tileRange);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary import("../TileRange.js").default object.
|
||||
* @return {import("../TileRange.js").default|null} Tile range.
|
||||
*/
|
||||
TileGrid.prototype.getTileRangeForTileCoordAndZ = function (tileCoord, z, opt_tileRange) {
|
||||
if (z > this.maxZoom || z < this.minZoom) {
|
||||
return null;
|
||||
}
|
||||
var tileCoordZ = tileCoord[0];
|
||||
var tileCoordX = tileCoord[1];
|
||||
var tileCoordY = tileCoord[2];
|
||||
if (z === tileCoordZ) {
|
||||
return createOrUpdateTileRange(tileCoordX, tileCoordY, tileCoordX, tileCoordY, opt_tileRange);
|
||||
}
|
||||
if (this.zoomFactor_) {
|
||||
var factor = Math.pow(this.zoomFactor_, z - tileCoordZ);
|
||||
var minX = Math.floor(tileCoordX * factor);
|
||||
var minY = Math.floor(tileCoordY * factor);
|
||||
if (z < tileCoordZ) {
|
||||
return createOrUpdateTileRange(minX, minX, minY, minY, opt_tileRange);
|
||||
}
|
||||
var maxX = Math.floor(factor * (tileCoordX + 1)) - 1;
|
||||
var maxY = Math.floor(factor * (tileCoordY + 1)) - 1;
|
||||
return createOrUpdateTileRange(minX, maxX, minY, maxY, opt_tileRange);
|
||||
}
|
||||
var tileCoordExtent = this.getTileCoordExtent(tileCoord, this.tmpExtent_);
|
||||
return this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);
|
||||
};
|
||||
/**
|
||||
* Get the extent for a tile range.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {import("../TileRange.js").default} tileRange Tile range.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary import("../extent.js").Extent object.
|
||||
* @return {import("../extent.js").Extent} Extent.
|
||||
*/
|
||||
TileGrid.prototype.getTileRangeExtent = function (z, tileRange, opt_extent) {
|
||||
var origin = this.getOrigin(z);
|
||||
var resolution = this.getResolution(z);
|
||||
var tileSize = toSize(this.getTileSize(z), this.tmpSize_);
|
||||
var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;
|
||||
var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;
|
||||
var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;
|
||||
var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;
|
||||
return createOrUpdate(minX, minY, maxX, maxY, opt_extent);
|
||||
};
|
||||
/**
|
||||
* Get a tile range for the given extent and integer zoom level.
|
||||
* @param {import("../extent.js").Extent} extent Extent.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {import("../TileRange.js").default} [opt_tileRange] Temporary tile range object.
|
||||
* @return {import("../TileRange.js").default} Tile range.
|
||||
*/
|
||||
TileGrid.prototype.getTileRangeForExtentAndZ = function (extent, z, opt_tileRange) {
|
||||
var tileCoord = tmpTileCoord;
|
||||
this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tileCoord);
|
||||
var minX = tileCoord[1];
|
||||
var minY = tileCoord[2];
|
||||
this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tileCoord);
|
||||
return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);
|
||||
};
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @return {import("../coordinate.js").Coordinate} Tile center.
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordCenter = function (tileCoord) {
|
||||
var origin = this.getOrigin(tileCoord[0]);
|
||||
var resolution = this.getResolution(tileCoord[0]);
|
||||
var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);
|
||||
return [
|
||||
origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,
|
||||
origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,
|
||||
];
|
||||
};
|
||||
/**
|
||||
* Get the extent of a tile coordinate.
|
||||
*
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] Temporary extent object.
|
||||
* @return {import("../extent.js").Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordExtent = function (tileCoord, opt_extent) {
|
||||
var origin = this.getOrigin(tileCoord[0]);
|
||||
var resolution = this.getResolution(tileCoord[0]);
|
||||
var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);
|
||||
var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;
|
||||
var minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;
|
||||
var maxX = minX + tileSize[0] * resolution;
|
||||
var maxY = minY + tileSize[1] * resolution;
|
||||
return createOrUpdate(minX, minY, maxX, maxY, opt_extent);
|
||||
};
|
||||
/**
|
||||
* Get the tile coordinate for the given map coordinate and resolution. This
|
||||
* method considers that coordinates that intersect tile boundaries should be
|
||||
* assigned the higher tile coordinate.
|
||||
*
|
||||
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Destination import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordForCoordAndResolution = function (coordinate, resolution, opt_tileCoord) {
|
||||
return this.getTileCoordForXYAndResolution_(coordinate[0], coordinate[1], resolution, false, opt_tileCoord);
|
||||
};
|
||||
/**
|
||||
* Note that this method should not be called for resolutions that correspond
|
||||
* to an integer zoom level. Instead call the `getTileCoordForXYAndZ_` method.
|
||||
* @param {number} x X.
|
||||
* @param {number} y Y.
|
||||
* @param {number} resolution Resolution (for a non-integer zoom level).
|
||||
* @param {boolean} reverseIntersectionPolicy Instead of letting edge
|
||||
* intersections go to the higher tile coordinate, let edge intersections
|
||||
* go to the lower tile coordinate.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @private
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordForXYAndResolution_ = function (x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {
|
||||
var z = this.getZForResolution(resolution);
|
||||
var scale = resolution / this.getResolution(z);
|
||||
var origin = this.getOrigin(z);
|
||||
var tileSize = toSize(this.getTileSize(z), this.tmpSize_);
|
||||
var tileCoordX = (scale * (x - origin[0])) / resolution / tileSize[0];
|
||||
var tileCoordY = (scale * (origin[1] - y)) / resolution / tileSize[1];
|
||||
if (reverseIntersectionPolicy) {
|
||||
tileCoordX = ceil(tileCoordX, DECIMALS) - 1;
|
||||
tileCoordY = ceil(tileCoordY, DECIMALS) - 1;
|
||||
}
|
||||
else {
|
||||
tileCoordX = floor(tileCoordX, DECIMALS);
|
||||
tileCoordY = floor(tileCoordY, DECIMALS);
|
||||
}
|
||||
return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);
|
||||
};
|
||||
/**
|
||||
* Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
|
||||
* they should have separate implementations. This method is for integer zoom
|
||||
* levels. The other method should only be called for resolutions corresponding
|
||||
* to non-integer zoom levels.
|
||||
* @param {number} x Map x coordinate.
|
||||
* @param {number} y Map y coordinate.
|
||||
* @param {number} z Integer zoom level.
|
||||
* @param {boolean} reverseIntersectionPolicy Instead of letting edge
|
||||
* intersections go to the higher tile coordinate, let edge intersections
|
||||
* go to the lower tile coordinate.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Temporary import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @private
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordForXYAndZ_ = function (x, y, z, reverseIntersectionPolicy, opt_tileCoord) {
|
||||
var origin = this.getOrigin(z);
|
||||
var resolution = this.getResolution(z);
|
||||
var tileSize = toSize(this.getTileSize(z), this.tmpSize_);
|
||||
var tileCoordX = (x - origin[0]) / resolution / tileSize[0];
|
||||
var tileCoordY = (origin[1] - y) / resolution / tileSize[1];
|
||||
if (reverseIntersectionPolicy) {
|
||||
tileCoordX = ceil(tileCoordX, DECIMALS) - 1;
|
||||
tileCoordY = ceil(tileCoordY, DECIMALS) - 1;
|
||||
}
|
||||
else {
|
||||
tileCoordX = floor(tileCoordX, DECIMALS);
|
||||
tileCoordY = floor(tileCoordY, DECIMALS);
|
||||
}
|
||||
return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);
|
||||
};
|
||||
/**
|
||||
* Get a tile coordinate given a map coordinate and zoom level.
|
||||
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
||||
* @param {number} z Zoom level.
|
||||
* @param {import("../tilecoord.js").TileCoord} [opt_tileCoord] Destination import("../tilecoord.js").TileCoord object.
|
||||
* @return {import("../tilecoord.js").TileCoord} Tile coordinate.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordForCoordAndZ = function (coordinate, z, opt_tileCoord) {
|
||||
return this.getTileCoordForXYAndZ_(coordinate[0], coordinate[1], z, false, opt_tileCoord);
|
||||
};
|
||||
/**
|
||||
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
||||
* @return {number} Tile resolution.
|
||||
*/
|
||||
TileGrid.prototype.getTileCoordResolution = function (tileCoord) {
|
||||
return this.resolutions_[tileCoord[0]];
|
||||
};
|
||||
/**
|
||||
* Get the tile size for a zoom level. The type of the return value matches the
|
||||
* `tileSize` or `tileSizes` that the tile grid was configured with. To always
|
||||
* get an {@link import("../size.js").Size}, run the result through {@link module:ol/size.toSize}.
|
||||
* @param {number} z Z.
|
||||
* @return {number|import("../size.js").Size} Tile size.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getTileSize = function (z) {
|
||||
if (this.tileSize_) {
|
||||
return this.tileSize_;
|
||||
}
|
||||
else {
|
||||
return this.tileSizes_[z];
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @param {number} z Zoom level.
|
||||
* @return {import("../TileRange.js").default} Extent tile range for the specified zoom level.
|
||||
*/
|
||||
TileGrid.prototype.getFullTileRange = function (z) {
|
||||
if (!this.fullTileRanges_) {
|
||||
return this.extent_
|
||||
? this.getTileRangeForExtentAndZ(this.extent_, z)
|
||||
: null;
|
||||
}
|
||||
else {
|
||||
return this.fullTileRanges_[z];
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number|import("../array.js").NearestDirectionFunction} [opt_direction]
|
||||
* If 0, the nearest resolution will be used.
|
||||
* If 1, the nearest higher resolution (lower Z) will be used. If -1, the
|
||||
* nearest lower resolution (higher Z) will be used. Default is 0.
|
||||
* Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.
|
||||
*
|
||||
* For example to change tile Z at the midpoint of zoom levels
|
||||
* ```js
|
||||
* function(value, high, low) {
|
||||
* return value - low * Math.sqrt(high / low);
|
||||
* }
|
||||
* ```
|
||||
* @return {number} Z.
|
||||
* @api
|
||||
*/
|
||||
TileGrid.prototype.getZForResolution = function (resolution, opt_direction) {
|
||||
var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);
|
||||
return clamp(z, this.minZoom, this.maxZoom);
|
||||
};
|
||||
/**
|
||||
* The tile with the provided tile coordinate intersects the given viewport.
|
||||
* @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.
|
||||
* @param {Array<number>} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.
|
||||
* @return {boolean} The tile with the provided tile coordinate intersects the given viewport.
|
||||
*/
|
||||
TileGrid.prototype.tileCoordIntersectsViewport = function (tileCoord, viewport) {
|
||||
return intersectsLinearRing(viewport, 0, viewport.length, 2, this.getTileCoordExtent(tileCoord));
|
||||
};
|
||||
/**
|
||||
* @param {!import("../extent.js").Extent} extent Extent for this tile grid.
|
||||
* @private
|
||||
*/
|
||||
TileGrid.prototype.calculateTileRanges_ = function (extent) {
|
||||
var length = this.resolutions_.length;
|
||||
var fullTileRanges = new Array(length);
|
||||
for (var z = this.minZoom; z < length; ++z) {
|
||||
fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);
|
||||
}
|
||||
this.fullTileRanges_ = fullTileRanges;
|
||||
};
|
||||
return TileGrid;
|
||||
}());
|
||||
export default TileGrid;
|
||||
//# sourceMappingURL=TileGrid.js.map
|
||||
1
node_modules/ol/tilegrid/TileGrid.js.map
generated
vendored
Normal file
1
node_modules/ol/tilegrid/TileGrid.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
128
node_modules/ol/tilegrid/WMTS.d.ts
generated
vendored
Normal file
128
node_modules/ol/tilegrid/WMTS.d.ts
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* Create a tile grid from a WMTS capabilities matrix set and an
|
||||
* optional TileMatrixSetLimits.
|
||||
* @param {Object} matrixSet An object representing a matrixSet in the
|
||||
* capabilities document.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] An optional extent to restrict the tile
|
||||
* ranges the server provides.
|
||||
* @param {Array<Object>} [opt_matrixLimits] An optional object representing
|
||||
* the available matrices for tileGrid.
|
||||
* @return {WMTSTileGrid} WMTS tileGrid instance.
|
||||
* @api
|
||||
*/
|
||||
export function createFromCapabilitiesMatrixSet(matrixSet: any, opt_extent?: import("../extent.js").Extent | undefined, opt_matrixLimits?: any[] | undefined): WMTSTileGrid;
|
||||
export default WMTSTileGrid;
|
||||
export type Options = {
|
||||
/**
|
||||
* Extent for the tile grid. No tiles
|
||||
* outside this extent will be requested by {@link module :ol/source/Tile~TileSource} sources.
|
||||
* When no `origin` or `origins` are configured, the `origin` will be set to the
|
||||
* top-left corner of the extent.
|
||||
*/
|
||||
extent?: import("../extent.js").Extent | undefined;
|
||||
/**
|
||||
* The tile grid origin, i.e.
|
||||
* where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left
|
||||
* to right and downwards. If not specified, `extent` or `origins` must be provided.
|
||||
*/
|
||||
origin?: import("../coordinate.js").Coordinate | undefined;
|
||||
/**
|
||||
* Tile grid origins,
|
||||
* i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If
|
||||
* given, the array length should match the length of the `resolutions` array, i.e.
|
||||
* each resolution can have a different origin. Tile coordinates increase left to
|
||||
* right and downwards. If not specified, `extent` or `origin` must be provided.
|
||||
*/
|
||||
origins?: import("../coordinate.js").Coordinate[] | undefined;
|
||||
/**
|
||||
* Resolutions. The array index of each
|
||||
* resolution needs to match the zoom level. This means that even if a `minZoom`
|
||||
* is configured, the resolutions array will have a length of `maxZoom + 1`
|
||||
*/
|
||||
resolutions: Array<number>;
|
||||
/**
|
||||
* matrix IDs. The length of this array needs
|
||||
* to match the length of the `resolutions` array.
|
||||
*/
|
||||
matrixIds: Array<string>;
|
||||
/**
|
||||
* Number of tile rows and columns
|
||||
* of the grid for each zoom level. The values here are the `TileMatrixWidth` and
|
||||
* `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and
|
||||
* define each zoom level's extent together with the `origin` or `origins`.
|
||||
* A grid `extent` can be configured in addition, and will further limit the extent for
|
||||
* which tile requests are made by sources. If the bottom-left corner of
|
||||
* an extent is used as `origin` or `origins`, then the `y` value must be
|
||||
* negative because OpenLayers tile coordinates use the top left as the origin.
|
||||
*/
|
||||
sizes?: import("../size.js").Size[] | undefined;
|
||||
/**
|
||||
* Tile size.
|
||||
*/
|
||||
tileSize?: number | import("../size.js").Size | undefined;
|
||||
/**
|
||||
* Tile sizes. The length of
|
||||
* this array needs to match the length of the `resolutions` array.
|
||||
*/
|
||||
tileSizes?: (number | import("../size.js").Size)[] | undefined;
|
||||
};
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {import("../extent.js").Extent} [extent] Extent for the tile grid. No tiles
|
||||
* outside this extent will be requested by {@link module:ol/source/Tile~TileSource} sources.
|
||||
* When no `origin` or `origins` are configured, the `origin` will be set to the
|
||||
* top-left corner of the extent.
|
||||
* @property {import("../coordinate.js").Coordinate} [origin] The tile grid origin, i.e.
|
||||
* where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left
|
||||
* to right and downwards. If not specified, `extent` or `origins` must be provided.
|
||||
* @property {Array<import("../coordinate.js").Coordinate>} [origins] Tile grid origins,
|
||||
* i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If
|
||||
* given, the array length should match the length of the `resolutions` array, i.e.
|
||||
* each resolution can have a different origin. Tile coordinates increase left to
|
||||
* right and downwards. If not specified, `extent` or `origin` must be provided.
|
||||
* @property {!Array<number>} resolutions Resolutions. The array index of each
|
||||
* resolution needs to match the zoom level. This means that even if a `minZoom`
|
||||
* is configured, the resolutions array will have a length of `maxZoom + 1`
|
||||
* @property {!Array<string>} matrixIds matrix IDs. The length of this array needs
|
||||
* to match the length of the `resolutions` array.
|
||||
* @property {Array<import("../size.js").Size>} [sizes] Number of tile rows and columns
|
||||
* of the grid for each zoom level. The values here are the `TileMatrixWidth` and
|
||||
* `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and
|
||||
* define each zoom level's extent together with the `origin` or `origins`.
|
||||
* A grid `extent` can be configured in addition, and will further limit the extent for
|
||||
* which tile requests are made by sources. If the bottom-left corner of
|
||||
* an extent is used as `origin` or `origins`, then the `y` value must be
|
||||
* negative because OpenLayers tile coordinates use the top left as the origin.
|
||||
* @property {number|import("../size.js").Size} [tileSize] Tile size.
|
||||
* @property {Array<number|import("../size.js").Size>} [tileSizes] Tile sizes. The length of
|
||||
* this array needs to match the length of the `resolutions` array.
|
||||
*/
|
||||
/**
|
||||
* @classdesc
|
||||
* Set the grid pattern for sources accessing WMTS tiled-image servers.
|
||||
* @api
|
||||
*/
|
||||
declare class WMTSTileGrid extends TileGrid {
|
||||
/**
|
||||
* @param {Options} options WMTS options.
|
||||
*/
|
||||
constructor(options: Options);
|
||||
/**
|
||||
* @private
|
||||
* @type {!Array<string>}
|
||||
*/
|
||||
private matrixIds_;
|
||||
/**
|
||||
* @param {number} z Z.
|
||||
* @return {string} MatrixId..
|
||||
*/
|
||||
getMatrixId(z: number): string;
|
||||
/**
|
||||
* Get the list of matrix identifiers.
|
||||
* @return {Array<string>} MatrixIds.
|
||||
* @api
|
||||
*/
|
||||
getMatrixIds(): Array<string>;
|
||||
}
|
||||
import TileGrid from "./TileGrid.js";
|
||||
//# sourceMappingURL=WMTS.d.ts.map
|
||||
1
node_modules/ol/tilegrid/WMTS.d.ts.map
generated
vendored
Normal file
1
node_modules/ol/tilegrid/WMTS.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"WMTS.d.ts","sourceRoot":"","sources":["../src/tilegrid/WMTS.js"],"names":[],"mappings":"AAuFA;;;;;;;;;;;GAWG;AACH,+JAHY,YAAY,CA4FvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtKc,MAAM,MAAM,CAAC;;;;;eAGb,MAAM,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;AAjB5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAkBjB;IALC;;;OAGG;IACH,mBAAmC;IAGrC;;;OAGG;IACH,eAHW,MAAM,GACL,MAAM,CAIjB;IAED;;;;OAIG;IACH,gBAHY,MAAM,MAAM,CAAC,CAKxB;CACF"}
|
||||
186
node_modules/ol/tilegrid/WMTS.js
generated
vendored
Normal file
186
node_modules/ol/tilegrid/WMTS.js
generated
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
/**
|
||||
* @module ol/tilegrid/WMTS
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import TileGrid from './TileGrid.js';
|
||||
import { find } from '../array.js';
|
||||
import { get as getProjection } from '../proj.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {import("../extent.js").Extent} [extent] Extent for the tile grid. No tiles
|
||||
* outside this extent will be requested by {@link module:ol/source/Tile~TileSource} sources.
|
||||
* When no `origin` or `origins` are configured, the `origin` will be set to the
|
||||
* top-left corner of the extent.
|
||||
* @property {import("../coordinate.js").Coordinate} [origin] The tile grid origin, i.e.
|
||||
* where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left
|
||||
* to right and downwards. If not specified, `extent` or `origins` must be provided.
|
||||
* @property {Array<import("../coordinate.js").Coordinate>} [origins] Tile grid origins,
|
||||
* i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If
|
||||
* given, the array length should match the length of the `resolutions` array, i.e.
|
||||
* each resolution can have a different origin. Tile coordinates increase left to
|
||||
* right and downwards. If not specified, `extent` or `origin` must be provided.
|
||||
* @property {!Array<number>} resolutions Resolutions. The array index of each
|
||||
* resolution needs to match the zoom level. This means that even if a `minZoom`
|
||||
* is configured, the resolutions array will have a length of `maxZoom + 1`
|
||||
* @property {!Array<string>} matrixIds matrix IDs. The length of this array needs
|
||||
* to match the length of the `resolutions` array.
|
||||
* @property {Array<import("../size.js").Size>} [sizes] Number of tile rows and columns
|
||||
* of the grid for each zoom level. The values here are the `TileMatrixWidth` and
|
||||
* `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and
|
||||
* define each zoom level's extent together with the `origin` or `origins`.
|
||||
* A grid `extent` can be configured in addition, and will further limit the extent for
|
||||
* which tile requests are made by sources. If the bottom-left corner of
|
||||
* an extent is used as `origin` or `origins`, then the `y` value must be
|
||||
* negative because OpenLayers tile coordinates use the top left as the origin.
|
||||
* @property {number|import("../size.js").Size} [tileSize] Tile size.
|
||||
* @property {Array<number|import("../size.js").Size>} [tileSizes] Tile sizes. The length of
|
||||
* this array needs to match the length of the `resolutions` array.
|
||||
*/
|
||||
/**
|
||||
* @classdesc
|
||||
* Set the grid pattern for sources accessing WMTS tiled-image servers.
|
||||
* @api
|
||||
*/
|
||||
var WMTSTileGrid = /** @class */ (function (_super) {
|
||||
__extends(WMTSTileGrid, _super);
|
||||
/**
|
||||
* @param {Options} options WMTS options.
|
||||
*/
|
||||
function WMTSTileGrid(options) {
|
||||
var _this = _super.call(this, {
|
||||
extent: options.extent,
|
||||
origin: options.origin,
|
||||
origins: options.origins,
|
||||
resolutions: options.resolutions,
|
||||
tileSize: options.tileSize,
|
||||
tileSizes: options.tileSizes,
|
||||
sizes: options.sizes,
|
||||
}) || this;
|
||||
/**
|
||||
* @private
|
||||
* @type {!Array<string>}
|
||||
*/
|
||||
_this.matrixIds_ = options.matrixIds;
|
||||
return _this;
|
||||
}
|
||||
/**
|
||||
* @param {number} z Z.
|
||||
* @return {string} MatrixId..
|
||||
*/
|
||||
WMTSTileGrid.prototype.getMatrixId = function (z) {
|
||||
return this.matrixIds_[z];
|
||||
};
|
||||
/**
|
||||
* Get the list of matrix identifiers.
|
||||
* @return {Array<string>} MatrixIds.
|
||||
* @api
|
||||
*/
|
||||
WMTSTileGrid.prototype.getMatrixIds = function () {
|
||||
return this.matrixIds_;
|
||||
};
|
||||
return WMTSTileGrid;
|
||||
}(TileGrid));
|
||||
export default WMTSTileGrid;
|
||||
/**
|
||||
* Create a tile grid from a WMTS capabilities matrix set and an
|
||||
* optional TileMatrixSetLimits.
|
||||
* @param {Object} matrixSet An object representing a matrixSet in the
|
||||
* capabilities document.
|
||||
* @param {import("../extent.js").Extent} [opt_extent] An optional extent to restrict the tile
|
||||
* ranges the server provides.
|
||||
* @param {Array<Object>} [opt_matrixLimits] An optional object representing
|
||||
* the available matrices for tileGrid.
|
||||
* @return {WMTSTileGrid} WMTS tileGrid instance.
|
||||
* @api
|
||||
*/
|
||||
export function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) {
|
||||
/** @type {!Array<number>} */
|
||||
var resolutions = [];
|
||||
/** @type {!Array<string>} */
|
||||
var matrixIds = [];
|
||||
/** @type {!Array<import("../coordinate.js").Coordinate>} */
|
||||
var origins = [];
|
||||
/** @type {!Array<number|import("../size.js").Size>} */
|
||||
var tileSizes = [];
|
||||
/** @type {!Array<import("../size.js").Size>} */
|
||||
var sizes = [];
|
||||
var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];
|
||||
var supportedCRSPropName = 'SupportedCRS';
|
||||
var matrixIdsPropName = 'TileMatrix';
|
||||
var identifierPropName = 'Identifier';
|
||||
var scaleDenominatorPropName = 'ScaleDenominator';
|
||||
var topLeftCornerPropName = 'TopLeftCorner';
|
||||
var tileWidthPropName = 'TileWidth';
|
||||
var tileHeightPropName = 'TileHeight';
|
||||
var code = matrixSet[supportedCRSPropName];
|
||||
var projection = getProjection(code);
|
||||
var metersPerUnit = projection.getMetersPerUnit();
|
||||
// swap origin x and y coordinates if axis orientation is lat/long
|
||||
var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';
|
||||
matrixSet[matrixIdsPropName].sort(function (a, b) {
|
||||
return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];
|
||||
});
|
||||
matrixSet[matrixIdsPropName].forEach(function (elt) {
|
||||
var matrixAvailable;
|
||||
// use of matrixLimits to filter TileMatrices from GetCapabilities
|
||||
// TileMatrixSet from unavailable matrix levels.
|
||||
if (matrixLimits.length > 0) {
|
||||
matrixAvailable = find(matrixLimits, function (elt_ml) {
|
||||
if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {
|
||||
return true;
|
||||
}
|
||||
// Fallback for tileMatrix identifiers that don't get prefixed
|
||||
// by their tileMatrixSet identifiers.
|
||||
if (elt[identifierPropName].indexOf(':') === -1) {
|
||||
return (matrixSet[identifierPropName] + ':' + elt[identifierPropName] ===
|
||||
elt_ml[matrixIdsPropName]);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
matrixAvailable = true;
|
||||
}
|
||||
if (matrixAvailable) {
|
||||
matrixIds.push(elt[identifierPropName]);
|
||||
var resolution = (elt[scaleDenominatorPropName] * 0.28e-3) / metersPerUnit;
|
||||
var tileWidth = elt[tileWidthPropName];
|
||||
var tileHeight = elt[tileHeightPropName];
|
||||
if (switchOriginXY) {
|
||||
origins.push([
|
||||
elt[topLeftCornerPropName][1],
|
||||
elt[topLeftCornerPropName][0],
|
||||
]);
|
||||
}
|
||||
else {
|
||||
origins.push(elt[topLeftCornerPropName]);
|
||||
}
|
||||
resolutions.push(resolution);
|
||||
tileSizes.push(tileWidth == tileHeight ? tileWidth : [tileWidth, tileHeight]);
|
||||
sizes.push([elt['MatrixWidth'], elt['MatrixHeight']]);
|
||||
}
|
||||
});
|
||||
return new WMTSTileGrid({
|
||||
extent: opt_extent,
|
||||
origins: origins,
|
||||
resolutions: resolutions,
|
||||
matrixIds: matrixIds,
|
||||
tileSizes: tileSizes,
|
||||
sizes: sizes,
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=WMTS.js.map
|
||||
1
node_modules/ol/tilegrid/WMTS.js.map
generated
vendored
Normal file
1
node_modules/ol/tilegrid/WMTS.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"WMTS.js","sourceRoot":"","sources":["../src/tilegrid/WMTS.js"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,GAAG,IAAI,aAAa,EAAC,MAAM,YAAY,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAE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/tilegrid/common.d.ts
generated
vendored
Normal file
14
node_modules/ol/tilegrid/common.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @module ol/tilegrid/common
|
||||
*/
|
||||
/**
|
||||
* Default maximum zoom for default tile grids.
|
||||
* @type {number}
|
||||
*/
|
||||
export const DEFAULT_MAX_ZOOM: number;
|
||||
/**
|
||||
* Default tile size.
|
||||
* @type {number}
|
||||
*/
|
||||
export const DEFAULT_TILE_SIZE: number;
|
||||
//# sourceMappingURL=common.d.ts.map
|
||||
1
node_modules/ol/tilegrid/common.d.ts.map
generated
vendored
Normal file
1
node_modules/ol/tilegrid/common.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/tilegrid/common.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,+BAFU,MAAM,CAEmB;AAEnC;;;GAGG;AACH,gCAFU,MAAM,CAEqB"}
|
||||
14
node_modules/ol/tilegrid/common.js
generated
vendored
Normal file
14
node_modules/ol/tilegrid/common.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @module ol/tilegrid/common
|
||||
*/
|
||||
/**
|
||||
* Default maximum zoom for default tile grids.
|
||||
* @type {number}
|
||||
*/
|
||||
export var DEFAULT_MAX_ZOOM = 42;
|
||||
/**
|
||||
* Default tile size.
|
||||
* @type {number}
|
||||
*/
|
||||
export var DEFAULT_TILE_SIZE = 256;
|
||||
//# sourceMappingURL=common.js.map
|
||||
1
node_modules/ol/tilegrid/common.js.map
generated
vendored
Normal file
1
node_modules/ol/tilegrid/common.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/tilegrid/common.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,CAAC,IAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG,GAAG,CAAC"}
|
||||
Reference in New Issue
Block a user