Shorter module paths for default exports
This commit is contained in:
@@ -37,7 +37,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Layer source for Bing Maps tile data.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/BingMaps~Options=} options Bing Maps options.
|
||||
* @api
|
||||
*/
|
||||
@@ -169,12 +169,12 @@ BingMaps.prototype.handleImageryMetadataResponse = function(response) {
|
||||
.replace('{subdomain}', subdomain)
|
||||
.replace('{culture}', culture);
|
||||
return (
|
||||
/**
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
/**
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
if (!tileCoord) {
|
||||
return undefined;
|
||||
|
||||
@@ -36,7 +36,7 @@ import XYZ from '../source/XYZ.js';
|
||||
* Layer source for the CartoDB Maps API.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/XYZ~XYZ}
|
||||
* @extends {module:ol/source/XYZ}
|
||||
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -17,9 +17,9 @@ import VectorSource from '../source/Vector.js';
|
||||
* @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
|
||||
* @property {number} [distance=20] Minimum distance in pixels between clusters.
|
||||
* @property {module:ol/extent~Extent} [extent] Extent.
|
||||
* @property {function(module:ol/Feature~Feature):module:ol/geom/Point~Point} [geometryFunction]
|
||||
* Function that takes an {@link module:ol/Feature~Feature} as argument and returns an
|
||||
* {@link module:ol/geom/Point~Point} as cluster calculation point for the feature. When a
|
||||
* @property {function(module:ol/Feature):module:ol/geom/Point} [geometryFunction]
|
||||
* Function that takes an {@link module:ol/Feature} as argument and returns an
|
||||
* {@link module:ol/geom/Point} as cluster calculation point for the feature. When a
|
||||
* feature should not be considered for clustering, the function should return
|
||||
* `null`. The default, which works when the underyling source contains point
|
||||
* features only, is
|
||||
@@ -31,7 +31,7 @@ import VectorSource from '../source/Vector.js';
|
||||
* See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
|
||||
* calculation point for polygons.
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {module:ol/source/Vector~VectorSource} source Source.
|
||||
* @property {module:ol/source/Vector} source Source.
|
||||
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@ import VectorSource from '../source/Vector.js';
|
||||
*
|
||||
* @constructor
|
||||
* @param {module:ol/source/Cluster~Options=} options Cluster options.
|
||||
* @extends {module:ol/source/Vector~VectorSource}
|
||||
* @extends {module:ol/source/Vector}
|
||||
* @api
|
||||
*/
|
||||
const Cluster = function(options) {
|
||||
@@ -68,25 +68,25 @@ const Cluster = function(options) {
|
||||
this.distance = options.distance !== undefined ? options.distance : 20;
|
||||
|
||||
/**
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
* @type {Array.<module:ol/Feature>}
|
||||
* @protected
|
||||
*/
|
||||
this.features = [];
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @return {module:ol/geom/Point~Point} Cluster calculation point.
|
||||
* @param {module:ol/Feature} feature Feature.
|
||||
* @return {module:ol/geom/Point} Cluster calculation point.
|
||||
* @protected
|
||||
*/
|
||||
this.geometryFunction = options.geometryFunction || function(feature) {
|
||||
const geometry = /** @type {module:ol/geom/Point~Point} */ (feature.getGeometry());
|
||||
const geometry = /** @type {module:ol/geom/Point} */ (feature.getGeometry());
|
||||
assert(geometry instanceof Point,
|
||||
10); // The default `geometryFunction` can only handle `module:ol/geom/Point~Point` geometries
|
||||
return geometry;
|
||||
};
|
||||
|
||||
/**
|
||||
* @type {module:ol/source/Vector~VectorSource}
|
||||
* @type {module:ol/source/Vector}
|
||||
* @protected
|
||||
*/
|
||||
this.source = options.source;
|
||||
@@ -109,7 +109,7 @@ Cluster.prototype.getDistance = function() {
|
||||
|
||||
/**
|
||||
* Get a reference to the wrapped source.
|
||||
* @return {module:ol/source/Vector~VectorSource} Source.
|
||||
* @return {module:ol/source/Vector} Source.
|
||||
* @api
|
||||
*/
|
||||
Cluster.prototype.getSource = function() {
|
||||
@@ -198,8 +198,8 @@ Cluster.prototype.cluster = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features
|
||||
* @return {module:ol/Feature~Feature} The cluster feature.
|
||||
* @param {Array.<module:ol/Feature>} features Features
|
||||
* @return {module:ol/Feature} The cluster feature.
|
||||
* @protected
|
||||
*/
|
||||
Cluster.prototype.createCluster = function(features) {
|
||||
|
||||
@@ -47,7 +47,7 @@ const ImageSourceEventType = {
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/events/Event~Event}
|
||||
* @extends {module:ol/events/Event}
|
||||
* @implements {oli.source.ImageEvent}
|
||||
* @param {string} type Type.
|
||||
* @param {module:ol/Image~Image} image The image.
|
||||
@@ -85,7 +85,7 @@ inherits(ImageSourceEvent, Event);
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {module:ol/source/Source~Source}
|
||||
* @extends {module:ol/source/Source}
|
||||
* @param {module:ol/source/Image~Options} options Single image source options.
|
||||
* @api
|
||||
*/
|
||||
@@ -149,8 +149,8 @@ ImageSource.prototype.findNearestResolution = function(resolution) {
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {module:ol/ImageBase~ImageBase} Single image.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {module:ol/ImageBase} Single image.
|
||||
*/
|
||||
ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
|
||||
const sourceProjection = this.getProjection();
|
||||
@@ -193,8 +193,8 @@ ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projec
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {module:ol/ImageBase~ImageBase} Single image.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {module:ol/ImageBase} Single image.
|
||||
* @protected
|
||||
*/
|
||||
ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {};
|
||||
@@ -202,7 +202,7 @@ ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio
|
||||
|
||||
/**
|
||||
* Handle image change events.
|
||||
* @param {module:ol/events/Event~Event} event Event.
|
||||
* @param {module:ol/events/Event} event Event.
|
||||
* @protected
|
||||
*/
|
||||
ImageSource.prototype.handleImageChange = function(event) {
|
||||
|
||||
@@ -50,7 +50,7 @@ import {appendParams} from '../uri.js';
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Image.Event
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @extends {module:ol/source/Image}
|
||||
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
|
||||
* @api
|
||||
*/
|
||||
@@ -223,7 +223,7 @@ ImageArcGISRest.prototype.getImageLoadFunction = function() {
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {Object} params Params.
|
||||
* @return {string} Request URL.
|
||||
* @private
|
||||
|
||||
@@ -12,12 +12,12 @@ import ImageSource from '../source/Image.js';
|
||||
* used by the source as an image. The arguments passed to the function are:
|
||||
* {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,
|
||||
* `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and
|
||||
* {@link module:ol/proj/Projection~Projection} the image projection. The canvas returned by
|
||||
* {@link module:ol/proj/Projection} the image projection. The canvas returned by
|
||||
* this function is cached by the source. The this keyword inside the function
|
||||
* references the {@link module:ol/source/ImageCanvas}.
|
||||
*
|
||||
* @typedef {function(this:module:ol/ImageCanvas~ImageCanvas, module:ol/extent~Extent, number,
|
||||
* number, module:ol/size~Size, module:ol/proj/Projection~Projection): HTMLCanvasElement} FunctionType
|
||||
* @typedef {function(this:module:ol/ImageCanvas, module:ol/extent~Extent, number,
|
||||
* number, module:ol/size~Size, module:ol/proj/Projection): HTMLCanvasElement} FunctionType
|
||||
*/
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ import ImageSource from '../source/Image.js';
|
||||
* Base class for image sources where a canvas element is the image.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @extends {module:ol/source/Image}
|
||||
* @param {module:ol/source/ImageCanvas~Options=} options ImageCanvas options.
|
||||
* @api
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ const ImageCanvasSource = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/ImageCanvas~ImageCanvas}
|
||||
* @type {module:ol/ImageCanvas}
|
||||
*/
|
||||
this.canvas_ = null;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import {appendParams} from '../uri.js';
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Image.Event
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @extends {module:ol/source/Image}
|
||||
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
|
||||
* @api
|
||||
*/
|
||||
@@ -221,7 +221,7 @@ ImageMapGuide.prototype.updateParams = function(params) {
|
||||
* @param {Object.<string, string|number>} params Request parameters.
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {string} The mapagent map image request URL.
|
||||
*/
|
||||
ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
|
||||
|
||||
@@ -33,7 +33,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
|
||||
* A layer source for displaying a single, static image.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @extends {module:ol/source/Image}
|
||||
* @param {module:ol/source/ImageStatic~Options=} options ImageStatic options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -49,7 +49,7 @@ import {appendParams} from '../uri.js';
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Image.Event
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @extends {module:ol/source/Image}
|
||||
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
|
||||
* @api
|
||||
*/
|
||||
@@ -283,7 +283,7 @@ ImageWMS.prototype.getImageLoadFunction = function() {
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {Object} params Params.
|
||||
* @return {string} Request URL.
|
||||
* @private
|
||||
|
||||
@@ -46,7 +46,7 @@ export const ATTRIBUTION = '© ' +
|
||||
* Layer source for the OpenStreetMap tile server.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/XYZ~XYZ}
|
||||
* @extends {module:ol/source/XYZ}
|
||||
* @param {module:ol/source/OSM~Options=} [opt_options] Open Street Map options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,7 @@ const RasterEventType = {
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/events/Event~Event}
|
||||
* @extends {module:ol/events/Event}
|
||||
* @implements {oli.source.RasterEvent}
|
||||
* @param {string} type Type.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState The frame state.
|
||||
@@ -103,7 +103,7 @@ inherits(RasterSourceEvent, Event);
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Array.<module:ol/source/Source~Source>} sources Input sources.
|
||||
* @property {Array.<module:ol/source/Source>} sources Input sources.
|
||||
* @property {module:ol/source/Raster~Operation} [operation] Raster operation.
|
||||
* The operation will be called with data from input sources
|
||||
* and the output will be assigned to the raster source.
|
||||
@@ -128,7 +128,7 @@ inherits(RasterSourceEvent, Event);
|
||||
* output pixel values.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @extends {module:ol/source/Image}
|
||||
* @fires ol.source.Raster.Event
|
||||
* @param {module:ol/source/Raster~Options=} options Options.
|
||||
* @api
|
||||
@@ -167,7 +167,7 @@ const RasterSource = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/TileQueue~TileQueue}
|
||||
* @type {module:ol/TileQueue}
|
||||
*/
|
||||
this.tileQueue_ = new TileQueue(
|
||||
function() {
|
||||
@@ -190,7 +190,7 @@ const RasterSource = function(options) {
|
||||
|
||||
/**
|
||||
* The most recently rendered image canvas.
|
||||
* @type {module:ol/ImageCanvas~ImageCanvas}
|
||||
* @type {module:ol/ImageCanvas}
|
||||
* @private
|
||||
*/
|
||||
this.renderedImageCanvas_ = null;
|
||||
@@ -262,7 +262,7 @@ RasterSource.prototype.setOperation = function(operation, opt_lib) {
|
||||
* Update the stored frame state.
|
||||
* @param {module:ol/extent~Extent} extent The view extent (in map units).
|
||||
* @param {number} resolution The view resolution.
|
||||
* @param {module:ol/proj/Projection~Projection} projection The view projection.
|
||||
* @param {module:ol/proj/Projection} projection The view projection.
|
||||
* @return {module:ol/PluggableMap~FrameState} The updated frame state.
|
||||
* @private
|
||||
*/
|
||||
@@ -455,7 +455,7 @@ function getLayerStatesArray(renderers) {
|
||||
|
||||
/**
|
||||
* Create renderers for all sources.
|
||||
* @param {Array.<module:ol/source/Source~Source>} sources The sources.
|
||||
* @param {Array.<module:ol/source/Source>} sources The sources.
|
||||
* @return {Array.<ol.renderer.canvas.Layer>} Array of layer renderers.
|
||||
*/
|
||||
function createRenderers(sources) {
|
||||
@@ -470,7 +470,7 @@ function createRenderers(sources) {
|
||||
|
||||
/**
|
||||
* Create a renderer for the provided source.
|
||||
* @param {module:ol/source/Source~Source} source The source.
|
||||
* @param {module:ol/source/Source} source The source.
|
||||
* @return {ol.renderer.canvas.Layer} The renderer.
|
||||
*/
|
||||
function createRenderer(source) {
|
||||
@@ -486,7 +486,7 @@ function createRenderer(source) {
|
||||
|
||||
/**
|
||||
* Create an image renderer for the provided source.
|
||||
* @param {module:ol/source/Image~ImageSource} source The source.
|
||||
* @param {module:ol/source/Image} source The source.
|
||||
* @return {ol.renderer.canvas.Layer} The renderer.
|
||||
*/
|
||||
function createImageRenderer(source) {
|
||||
@@ -497,7 +497,7 @@ function createImageRenderer(source) {
|
||||
|
||||
/**
|
||||
* Create a tile renderer for the provided source.
|
||||
* @param {module:ol/source/Tile~TileSource} source The source.
|
||||
* @param {module:ol/source/Tile} source The source.
|
||||
* @return {ol.renderer.canvas.Layer} The renderer.
|
||||
*/
|
||||
function createTileRenderer(source) {
|
||||
|
||||
@@ -47,7 +47,7 @@ import SourceState from '../source/State.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {module:ol/Object~BaseObject}
|
||||
* @extends {module:ol/Object}
|
||||
* @param {module:ol/source/Source~Options} options Source options.
|
||||
* @api
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ const Source = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/proj/Projection~Projection}
|
||||
* @type {module:ol/proj/Projection}
|
||||
*/
|
||||
this.projection_ = getProjection(options.projection);
|
||||
|
||||
@@ -114,7 +114,7 @@ Source.prototype.adaptAttributions_ = function(attributionLike) {
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T} callback Feature callback.
|
||||
* @param {function((module:ol/Feature|module:ol/render/Feature)): T} callback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ Source.prototype.getAttributions = function() {
|
||||
|
||||
/**
|
||||
* Get the projection of the source.
|
||||
* @return {module:ol/proj/Projection~Projection} Projection.
|
||||
* @return {module:ol/proj/Projection} Projection.
|
||||
* @api
|
||||
*/
|
||||
Source.prototype.getProjection = function() {
|
||||
|
||||
@@ -114,7 +114,7 @@ const ProviderConfig = {
|
||||
* Layer source for the Stamen tile server.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/XYZ~XYZ}
|
||||
* @extends {module:ol/source/XYZ}
|
||||
* @param {module:ol/source/Stamen~Options=} options Stamen options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
|
||||
* @property {number} [tilePixelRatio]
|
||||
* @property {module:ol/proj~ProjectionLike} [projection]
|
||||
* @property {module:ol/source/State~State} [state]
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid]
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid]
|
||||
* @property {boolean} [wrapX=true]
|
||||
* @property {number} [transition]
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {module:ol/source/Source~Source}
|
||||
* @extends {module:ol/source/Source}
|
||||
* @param {module:ol/source/Tile~Options=} options SourceTile source options.
|
||||
* @api
|
||||
*/
|
||||
@@ -64,13 +64,13 @@ const TileSource = function(options) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/tilegrid/TileGrid~TileGrid}
|
||||
* @type {module:ol/tilegrid/TileGrid}
|
||||
*/
|
||||
this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {module:ol/TileCache~TileCache}
|
||||
* @type {module:ol/TileCache}
|
||||
*/
|
||||
this.tileCache = new TileCache(options.cacheSize);
|
||||
|
||||
@@ -106,8 +106,8 @@ TileSource.prototype.canExpireCache = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {Object.<string, module:ol/TileRange~TileRange>} usedTiles Used tiles.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {Object.<string, module:ol/TileRange>} usedTiles Used tiles.
|
||||
*/
|
||||
TileSource.prototype.expireCache = function(projection, usedTiles) {
|
||||
const tileCache = this.getTileCacheForProjection(projection);
|
||||
@@ -118,10 +118,10 @@ TileSource.prototype.expireCache = function(projection, usedTiles) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {number} z Zoom level.
|
||||
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
|
||||
* @param {function(module:ol/Tile~Tile):(boolean|undefined)} callback Called with each
|
||||
* @param {module:ol/TileRange} tileRange Tile range.
|
||||
* @param {function(module:ol/Tile):(boolean|undefined)} callback Called with each
|
||||
* loaded tile. If the callback returns `false`, the tile will not be
|
||||
* considered loaded.
|
||||
* @return {boolean} The tile range is fully covered with loaded tiles.
|
||||
@@ -139,7 +139,7 @@ TileSource.prototype.forEachLoadedTile = function(projection, z, tileRange, call
|
||||
tileCoordKey = getKeyZXY(z, x, y);
|
||||
loaded = false;
|
||||
if (tileCache.containsKey(tileCoordKey)) {
|
||||
tile = /** @type {!module:ol/Tile~Tile} */ (tileCache.get(tileCoordKey));
|
||||
tile = /** @type {!module:ol/Tile} */ (tileCache.get(tileCoordKey));
|
||||
loaded = tile.getState() === TileState.LOADED;
|
||||
if (loaded) {
|
||||
loaded = (callback(tile) !== false);
|
||||
@@ -155,7 +155,7 @@ TileSource.prototype.forEachLoadedTile = function(projection, z, tileRange, call
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {number} Gutter.
|
||||
*/
|
||||
TileSource.prototype.getGutter = function(projection) {
|
||||
@@ -187,7 +187,7 @@ TileSource.prototype.setKey = function(key) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {boolean} Opaque.
|
||||
*/
|
||||
TileSource.prototype.getOpaque = function(projection) {
|
||||
@@ -209,15 +209,15 @@ TileSource.prototype.getResolutions = function() {
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {!module:ol/Tile~Tile} Tile.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {!module:ol/Tile} Tile.
|
||||
*/
|
||||
TileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {};
|
||||
|
||||
|
||||
/**
|
||||
* Return the tile grid of the tile source.
|
||||
* @return {module:ol/tilegrid/TileGrid~TileGrid} Tile grid.
|
||||
* @return {module:ol/tilegrid/TileGrid} Tile grid.
|
||||
* @api
|
||||
*/
|
||||
TileSource.prototype.getTileGrid = function() {
|
||||
@@ -226,8 +226,8 @@ TileSource.prototype.getTileGrid = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {!module:ol/tilegrid/TileGrid~TileGrid} Tile grid.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {!module:ol/tilegrid/TileGrid} Tile grid.
|
||||
*/
|
||||
TileSource.prototype.getTileGridForProjection = function(projection) {
|
||||
if (!this.tileGrid) {
|
||||
@@ -239,8 +239,8 @@ TileSource.prototype.getTileGridForProjection = function(projection) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {module:ol/TileCache~TileCache} Tile cache.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {module:ol/TileCache} Tile cache.
|
||||
* @protected
|
||||
*/
|
||||
TileSource.prototype.getTileCacheForProjection = function(projection) {
|
||||
@@ -268,7 +268,7 @@ TileSource.prototype.getTilePixelRatio = function(pixelRatio) {
|
||||
/**
|
||||
* @param {number} z Z.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {module:ol/size~Size} Tile size.
|
||||
*/
|
||||
TileSource.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
|
||||
@@ -288,7 +288,7 @@ TileSource.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
|
||||
* is outside the resolution and extent range of the tile grid, `null` will be
|
||||
* returned.
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/proj/Projection~Projection=} opt_projection Projection.
|
||||
* @param {module:ol/proj/Projection=} opt_projection Projection.
|
||||
* @return {module:ol/tilecoord~TileCoord} Tile coordinate to be passed to the tileUrlFunction or
|
||||
* null if no tile URL should be created for the passed `tileCoord`.
|
||||
*/
|
||||
@@ -317,7 +317,7 @@ TileSource.prototype.refresh = function() {
|
||||
* @param {number} z Tile coordinate z.
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
*/
|
||||
TileSource.prototype.useTile = UNDEFINED;
|
||||
|
||||
@@ -328,10 +328,10 @@ TileSource.prototype.useTile = UNDEFINED;
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/events/Event~Event}
|
||||
* @extends {module:ol/events/Event}
|
||||
* @implements {oli.source.Tile.Event}
|
||||
* @param {string} type Type.
|
||||
* @param {module:ol/Tile~Tile} tile The tile.
|
||||
* @param {module:ol/Tile} tile The tile.
|
||||
*/
|
||||
export const TileSourceEvent = function(type, tile) {
|
||||
|
||||
@@ -339,7 +339,7 @@ export const TileSourceEvent = function(type, tile) {
|
||||
|
||||
/**
|
||||
* The tile related to the event.
|
||||
* @type {module:ol/Tile~Tile}
|
||||
* @type {module:ol/Tile}
|
||||
* @api
|
||||
*/
|
||||
this.tile = tile;
|
||||
|
||||
@@ -60,7 +60,7 @@ import {appendParams} from '../uri.js';
|
||||
* {@link module:ol/source/XYZ~XYZ} data source.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/TileArcGISRest~Options=} opt_options Tile ArcGIS Rest options.
|
||||
* @api
|
||||
*/
|
||||
@@ -130,7 +130,7 @@ TileArcGISRest.prototype.getParams = function() {
|
||||
* @param {module:ol/size~Size} tileSize Tile size.
|
||||
* @param {module:ol/extent~Extent} tileExtent Tile extent.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {Object} params Params.
|
||||
* @return {string|undefined} Request URL.
|
||||
* @private
|
||||
|
||||
@@ -12,7 +12,7 @@ import {getKeyZXY} from '../tilecoord.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {module:ol/Tile~Tile}
|
||||
* @extends {module:ol/Tile}
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/size~Size} tileSize Tile size.
|
||||
* @param {string} text Text.
|
||||
@@ -78,7 +78,7 @@ LabeledTile.prototype.load = function() {};
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid.
|
||||
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
||||
*/
|
||||
|
||||
@@ -92,7 +92,7 @@ LabeledTile.prototype.load = function() {};
|
||||
* Uses Canvas context2d, so requires Canvas support.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/Tile~TileSource}
|
||||
* @extends {module:ol/source/Tile}
|
||||
* @param {module:ol/source/TileDebug~Options=} options Debug tile options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
|
||||
* @property {module:ol/source/State~State} [state] Source state.
|
||||
* @property {module:ol/ImageTile~TileClass} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link module:ol/ImageTile~ImageTile}.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is
|
||||
* ```js
|
||||
* function(imageTile, src) {
|
||||
@@ -93,7 +93,7 @@ const TileImage = function(options) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {function(new: module:ol/ImageTile~ImageTile, module:ol/tilecoord~TileCoord, module:ol/TileState, string,
|
||||
* @type {function(new: module:ol/ImageTile, module:ol/tilecoord~TileCoord, module:ol/TileState, string,
|
||||
* ?string, module:ol/Tile~LoadFunction, module:ol/Tile~Options=)}
|
||||
*/
|
||||
this.tileClass = options.tileClass !== undefined ?
|
||||
@@ -101,13 +101,13 @@ const TileImage = function(options) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {!Object.<string, module:ol/TileCache~TileCache>}
|
||||
* @type {!Object.<string, module:ol/TileCache>}
|
||||
*/
|
||||
this.tileCacheForProjection = {};
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {!Object.<string, module:ol/tilegrid/TileGrid~TileGrid>}
|
||||
* @type {!Object.<string, module:ol/tilegrid/TileGrid>}
|
||||
*/
|
||||
this.tileGridForProjection = {};
|
||||
|
||||
@@ -215,7 +215,9 @@ TileImage.prototype.getTileGridForProjection = function(projection) {
|
||||
if (!(projKey in this.tileGridForProjection)) {
|
||||
this.tileGridForProjection[projKey] = getTileGridForProjection(projection);
|
||||
}
|
||||
return /** @type {!module:ol/tilegrid/TileGrid~TileGrid} */ (this.tileGridForProjection[projKey]);
|
||||
return (
|
||||
/** @type {!module:ol/tilegrid/TileGrid} */ (this.tileGridForProjection[projKey])
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -244,9 +246,9 @@ TileImage.prototype.getTileCacheForProjection = function(projection) {
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {string} key The key set on the tile.
|
||||
* @return {!module:ol/Tile~Tile} Tile.
|
||||
* @return {!module:ol/Tile} Tile.
|
||||
* @private
|
||||
*/
|
||||
TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
|
||||
@@ -273,7 +275,7 @@ TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key)
|
||||
* @inheritDoc
|
||||
*/
|
||||
TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
const sourceProjection = /** @type {!module:ol/proj/Projection~Projection} */ (this.getProjection());
|
||||
const sourceProjection = /** @type {!module:ol/proj/Projection} */ (this.getProjection());
|
||||
if (!ENABLE_RASTER_REPROJECTION ||
|
||||
!sourceProjection || !projection || equivalent(sourceProjection, projection)) {
|
||||
return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);
|
||||
@@ -283,7 +285,7 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
let tile;
|
||||
const tileCoordKey = getKey(tileCoord);
|
||||
if (cache.containsKey(tileCoordKey)) {
|
||||
tile = /** @type {!module:ol/Tile~Tile} */ (cache.get(tileCoordKey));
|
||||
tile = /** @type {!module:ol/Tile} */ (cache.get(tileCoordKey));
|
||||
}
|
||||
const key = this.getKey();
|
||||
if (tile && tile.key == key) {
|
||||
@@ -322,8 +324,8 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {!module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @return {!module:ol/Tile~Tile} Tile.
|
||||
* @param {!module:ol/proj/Projection} projection Projection.
|
||||
* @return {!module:ol/Tile} Tile.
|
||||
* @protected
|
||||
*/
|
||||
TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
|
||||
@@ -384,7 +386,7 @@ TileImage.prototype.setRenderReprojectionEdges = function(render) {
|
||||
* for optimization reasons (custom tile size, resolutions, ...).
|
||||
*
|
||||
* @param {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @param {module:ol/tilegrid/TileGrid~TileGrid} tilegrid Tile grid to use for the projection.
|
||||
* @param {module:ol/tilegrid/TileGrid} tilegrid Tile grid to use for the projection.
|
||||
* @api
|
||||
*/
|
||||
TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
|
||||
@@ -401,7 +403,7 @@ TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/ImageTile~ImageTile} imageTile Image tile.
|
||||
* @param {module:ol/ImageTile} imageTile Image tile.
|
||||
* @param {string} src Source.
|
||||
*/
|
||||
function defaultTileLoadFunction(imageTile, src) {
|
||||
|
||||
@@ -49,7 +49,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Layer source for tile data in TileJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/TileJSON~Options=} options TileJSON options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {module:ol/Tile~Tile}
|
||||
* @extends {module:ol/Tile}
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/TileState} state State.
|
||||
* @param {string} src Image source URI.
|
||||
@@ -271,7 +271,7 @@ CustomTile.prototype.load = function() {
|
||||
* Layer source for UTFGrid interaction data loaded from TileJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/Tile~TileSource}
|
||||
* @extends {module:ol/source/Tile}
|
||||
* @param {module:ol/source/TileUTFGrid~Options=} options Source options.
|
||||
* @api
|
||||
*/
|
||||
@@ -466,7 +466,9 @@ UTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
|
||||
UTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
const tileCoordKey = getKeyZXY(z, x, y);
|
||||
if (this.tileCache.containsKey(tileCoordKey)) {
|
||||
return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey));
|
||||
return (
|
||||
/** @type {!module:ol/Tile} */ (this.tileCache.get(tileCoordKey))
|
||||
);
|
||||
} else {
|
||||
const tileCoord = [z, x, y];
|
||||
const urlTileCoord =
|
||||
|
||||
@@ -45,7 +45,7 @@ import {appendParams} from '../uri.js';
|
||||
* Higher values can increase reprojection performance, but decrease precision.
|
||||
* @property {module:ol/ImageTile~TileClass} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link module:ol/ImageTile~TileClass}.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
|
||||
* tilesize and extent supported by the server.
|
||||
* If this is not defined, a default grid will be used: if there is a projection
|
||||
* extent, the grid will be based on that; if not, a grid based on a global
|
||||
@@ -76,7 +76,7 @@ import {appendParams} from '../uri.js';
|
||||
* Layer source for tile data from WMS servers.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/TileWMS~Options=} [opt_options] Tile WMS options.
|
||||
* @api
|
||||
*/
|
||||
@@ -239,7 +239,7 @@ TileWMS.prototype.getParams = function() {
|
||||
* @param {module:ol/size~Size} tileSize Tile size.
|
||||
* @param {module:ol/extent~Extent} tileExtent Tile extent.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @param {Object} params Params.
|
||||
* @return {string|undefined} Request URL.
|
||||
* @private
|
||||
|
||||
@@ -16,7 +16,7 @@ import {getKeyZXY} from '../tilecoord.js';
|
||||
* @property {boolean} [opaque]
|
||||
* @property {module:ol/proj~ProjectionLike} [projection]
|
||||
* @property {module:ol/source/State~State} [state]
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid]
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid]
|
||||
* @property {module:ol/Tile~LoadFunction} tileLoadFunction
|
||||
* @property {number} [tilePixelRatio]
|
||||
* @property {module:ol/Tile~UrlFunction} [tileUrlFunction]
|
||||
@@ -33,8 +33,8 @@ import {getKeyZXY} from '../tilecoord.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @fires module:ol/source/Tile~TileSourceEvent
|
||||
* @extends {module:ol/source/Tile~TileSource}
|
||||
* @fires module:ol/source/TileEvent
|
||||
* @extends {module:ol/source/Tile}
|
||||
* @param {module:ol/source/UrlTile~Options=} options Image tile options.
|
||||
*/
|
||||
const UrlTile = function(options) {
|
||||
@@ -131,11 +131,11 @@ UrlTile.prototype.getUrls = function() {
|
||||
|
||||
/**
|
||||
* Handle tile change events.
|
||||
* @param {module:ol/events/Event~Event} event Event.
|
||||
* @param {module:ol/events/Event} event Event.
|
||||
* @protected
|
||||
*/
|
||||
UrlTile.prototype.handleTileChange = function(event) {
|
||||
const tile = /** @type {module:ol/Tile~Tile} */ (event.target);
|
||||
const tile = /** @type {module:ol/Tile} */ (event.target);
|
||||
const uid = getUid(tile);
|
||||
const tileState = tile.getState();
|
||||
let type;
|
||||
|
||||
@@ -37,10 +37,10 @@ import RBush from '../structs/RBush.js';
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/events/Event~Event}
|
||||
* @extends {module:ol/events/Event}
|
||||
* @implements {oli.source.Vector.Event}
|
||||
* @param {string} type Type.
|
||||
* @param {module:ol/Feature~Feature=} opt_feature Feature.
|
||||
* @param {module:ol/Feature=} opt_feature Feature.
|
||||
*/
|
||||
export const VectorSourceEvent = function(type, opt_feature) {
|
||||
|
||||
@@ -48,7 +48,7 @@ export const VectorSourceEvent = function(type, opt_feature) {
|
||||
|
||||
/**
|
||||
* The feature being added or removed.
|
||||
* @type {module:ol/Feature~Feature|undefined}
|
||||
* @type {module:ol/Feature|undefined}
|
||||
* @api
|
||||
*/
|
||||
this.feature = opt_feature;
|
||||
@@ -60,10 +60,10 @@ inherits(VectorSourceEvent, Event);
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
|
||||
* @property {Array.<module:ol/Feature~Feature>|module:ol/Collection~Collection.<module:ol/Feature~Feature>} [features]
|
||||
* Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
|
||||
* @property {Array.<module:ol/Feature>|module:ol/Collection.<module:ol/Feature>} [features]
|
||||
* Features. If provided as {@link module:ol/Collection}, the features in the source
|
||||
* and the collection will stay in sync.
|
||||
* @property {module:ol/format/Feature~FeatureFormat} [format] The feature format used by the XHR
|
||||
* @property {module:ol/format/Feature} [format] The feature format used by the XHR
|
||||
* feature loader when `url` is set. Required if `url` is set, otherwise ignored.
|
||||
* @property {module:ol/Feature~FeatureLoader} [loader]
|
||||
* The loader function used to load features, from a remote source for example.
|
||||
@@ -135,7 +135,7 @@ inherits(VectorSourceEvent, Event);
|
||||
* through all features.
|
||||
*
|
||||
* When set to `false`, the features will be maintained in an
|
||||
* {@link module:ol/Collection~Collection}, which can be retrieved through
|
||||
* {@link module:ol/Collection}, which can be retrieved through
|
||||
* {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.
|
||||
* @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the
|
||||
* -180° and 180° meridians to work properly, this should be set to `false`. The
|
||||
@@ -150,7 +150,7 @@ inherits(VectorSourceEvent, Event);
|
||||
* vector data that is optimized for rendering.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/Source~Source}
|
||||
* @extends {module:ol/source/Source}
|
||||
* @fires ol.source.Vector.Event
|
||||
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
|
||||
* @api
|
||||
@@ -174,7 +174,7 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/format/Feature~FeatureFormat|undefined}
|
||||
* @type {module:ol/format/Feature|undefined}
|
||||
*/
|
||||
this.format_ = options.format;
|
||||
|
||||
@@ -195,7 +195,7 @@ const VectorSource = function(opt_options) {
|
||||
} else if (this.url_ !== undefined) {
|
||||
assert(this.format_, 7); // `format` must be set when `url` is set
|
||||
// create a XHR feature loader for "url" and "format"
|
||||
this.loader_ = xhr(this.url_, /** @type {module:ol/format/Feature~FeatureFormat} */ (this.format_));
|
||||
this.loader_ = xhr(this.url_, /** @type {module:ol/format/Feature} */ (this.format_));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,7 +209,7 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.structs.RBush.<module:ol/Feature~Feature>}
|
||||
* @type {ol.structs.RBush.<module:ol/Feature>}
|
||||
*/
|
||||
this.featuresRtree_ = useSpatialIndex ? new RBush() : null;
|
||||
|
||||
@@ -221,21 +221,21 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string, module:ol/Feature~Feature>}
|
||||
* @type {!Object.<string, module:ol/Feature>}
|
||||
*/
|
||||
this.nullGeometryFeatures_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features by id (the return from feature.getId()).
|
||||
* @private
|
||||
* @type {!Object.<string, module:ol/Feature~Feature>}
|
||||
* @type {!Object.<string, module:ol/Feature>}
|
||||
*/
|
||||
this.idIndex_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features without id (keyed by ol.getUid(feature)).
|
||||
* @private
|
||||
* @type {!Object.<string, module:ol/Feature~Feature>}
|
||||
* @type {!Object.<string, module:ol/Feature>}
|
||||
*/
|
||||
this.undefIdIndex_ = {};
|
||||
|
||||
@@ -247,7 +247,7 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/Collection~Collection.<module:ol/Feature~Feature>}
|
||||
* @type {module:ol/Collection.<module:ol/Feature>}
|
||||
*/
|
||||
this.featuresCollection_ = null;
|
||||
|
||||
@@ -279,7 +279,7 @@ inherits(VectorSource, Source);
|
||||
* instead. A feature will not be added to the source if feature with
|
||||
* the same id is already there. The reason for this behavior is to avoid
|
||||
* feature duplication when using bbox or tile loading strategies.
|
||||
* @param {module:ol/Feature~Feature} feature Feature to add.
|
||||
* @param {module:ol/Feature} feature Feature to add.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.addFeature = function(feature) {
|
||||
@@ -290,7 +290,7 @@ VectorSource.prototype.addFeature = function(feature) {
|
||||
|
||||
/**
|
||||
* Add a feature without firing a `change` event.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/Feature} feature Feature.
|
||||
* @protected
|
||||
*/
|
||||
VectorSource.prototype.addFeatureInternal = function(feature) {
|
||||
@@ -319,7 +319,7 @@ VectorSource.prototype.addFeatureInternal = function(feature) {
|
||||
|
||||
/**
|
||||
* @param {string} featureKey Unique identifier for the feature.
|
||||
* @param {module:ol/Feature~Feature} feature The feature.
|
||||
* @param {module:ol/Feature} feature The feature.
|
||||
* @private
|
||||
*/
|
||||
VectorSource.prototype.setupChangeEvents_ = function(featureKey, feature) {
|
||||
@@ -334,7 +334,7 @@ VectorSource.prototype.setupChangeEvents_ = function(featureKey, feature) {
|
||||
|
||||
/**
|
||||
* @param {string} featureKey Unique identifier for the feature.
|
||||
* @param {module:ol/Feature~Feature} feature The feature.
|
||||
* @param {module:ol/Feature} feature The feature.
|
||||
* @return {boolean} The feature is "valid", in the sense that it is also a
|
||||
* candidate for insertion into the Rtree.
|
||||
* @private
|
||||
@@ -359,7 +359,7 @@ VectorSource.prototype.addToIndex_ = function(featureKey, feature) {
|
||||
|
||||
/**
|
||||
* Add a batch of features to the source.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features to add.
|
||||
* @param {Array.<module:ol/Feature>} features Features to add.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.addFeatures = function(features) {
|
||||
@@ -370,7 +370,7 @@ VectorSource.prototype.addFeatures = function(features) {
|
||||
|
||||
/**
|
||||
* Add features without firing a `change` event.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature>} features Features.
|
||||
* @protected
|
||||
*/
|
||||
VectorSource.prototype.addFeaturesInternal = function(features) {
|
||||
@@ -411,7 +411,7 @@ VectorSource.prototype.addFeaturesInternal = function(features) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {!module:ol/Collection~Collection.<module:ol/Feature~Feature>} collection Collection.
|
||||
* @param {!module:ol/Collection.<module:ol/Feature>} collection Collection.
|
||||
* @private
|
||||
*/
|
||||
VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||
@@ -436,7 +436,7 @@ VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||
function(evt) {
|
||||
if (!modifyingCollection) {
|
||||
modifyingCollection = true;
|
||||
this.addFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
this.addFeature(/** @type {module:ol/Feature} */ (evt.element));
|
||||
modifyingCollection = false;
|
||||
}
|
||||
}, this);
|
||||
@@ -444,7 +444,7 @@ VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||
function(evt) {
|
||||
if (!modifyingCollection) {
|
||||
modifyingCollection = true;
|
||||
this.removeFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
this.removeFeature(/** @type {module:ol/Feature} */ (evt.element));
|
||||
modifyingCollection = false;
|
||||
}
|
||||
}, this);
|
||||
@@ -498,7 +498,7 @@ VectorSource.prototype.clear = function(opt_fast) {
|
||||
* stop and the function will return the same value.
|
||||
* Note: this function only iterate through the feature that have a defined geometry.
|
||||
*
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature): T} callback Called with each feature
|
||||
* on the source. Return a truthy value to stop iteration.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -520,7 +520,7 @@ VectorSource.prototype.forEachFeature = function(callback) {
|
||||
* value.
|
||||
*
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature): T} callback Called with each feature
|
||||
* whose goemetry contains the provided coordinate.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -552,7 +552,7 @@ VectorSource.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, c
|
||||
* features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature}.
|
||||
*
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature): T} callback Called with each feature
|
||||
* whose bounding box intersects the provided extent.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -577,7 +577,7 @@ VectorSource.prototype.forEachFeatureInExtent = function(extent, callback) {
|
||||
* source.forEachFeatureInExtent()} method instead.
|
||||
*
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature): T} callback Called with each feature
|
||||
* whose geometry intersects the provided extent.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -586,7 +586,7 @@ VectorSource.prototype.forEachFeatureInExtent = function(extent, callback) {
|
||||
VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callback) {
|
||||
return this.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/Feature} feature Feature.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
*/
|
||||
@@ -605,8 +605,8 @@ VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callb
|
||||
/**
|
||||
* Get the features collection associated with this source. Will be `null`
|
||||
* unless the source was configured with `useSpatialIndex` set to `false`, or
|
||||
* with an {@link module:ol/Collection~Collection} as `features`.
|
||||
* @return {module:ol/Collection~Collection.<module:ol/Feature~Feature>} The collection of features.
|
||||
* with an {@link module:ol/Collection} as `features`.
|
||||
* @return {module:ol/Collection.<module:ol/Feature>} The collection of features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeaturesCollection = function() {
|
||||
@@ -616,7 +616,7 @@ VectorSource.prototype.getFeaturesCollection = function() {
|
||||
|
||||
/**
|
||||
* Get all features on the source in random order.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeatures = function() {
|
||||
@@ -629,14 +629,16 @@ VectorSource.prototype.getFeatures = function() {
|
||||
extend(features, getValues(this.nullGeometryFeatures_));
|
||||
}
|
||||
}
|
||||
return /** @type {Array.<module:ol/Feature~Feature>} */ (features);
|
||||
return (
|
||||
/** @type {Array.<module:ol/Feature>} */ (features)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get all features whose geometry intersects the provided coordinate.
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeaturesAtCoordinate = function(coordinate) {
|
||||
@@ -656,7 +658,7 @@ VectorSource.prototype.getFeaturesAtCoordinate = function(coordinate) {
|
||||
* This method is not available when the source is configured with
|
||||
* `useSpatialIndex` set to `false`.
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeaturesInExtent = function(extent) {
|
||||
@@ -670,10 +672,10 @@ VectorSource.prototype.getFeaturesInExtent = function(extent) {
|
||||
* This method is not available when the source is configured with
|
||||
* `useSpatialIndex` set to `false`.
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {function(module:ol/Feature~Feature):boolean=} opt_filter Feature filter function.
|
||||
* The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}
|
||||
* @param {function(module:ol/Feature):boolean=} opt_filter Feature filter function.
|
||||
* The filter function will receive one argument, the {@link module:ol/Feature feature}
|
||||
* and it should return a boolean value. By default, no filtering is made.
|
||||
* @return {module:ol/Feature~Feature} Closest feature.
|
||||
* @return {module:ol/Feature} Closest feature.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getClosestFeatureToCoordinate = function(coordinate, opt_filter) {
|
||||
@@ -693,8 +695,8 @@ VectorSource.prototype.getClosestFeatureToCoordinate = function(coordinate, opt_
|
||||
const filter = opt_filter ? opt_filter : TRUE;
|
||||
this.featuresRtree_.forEachInExtent(extent,
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
* @param {module:ol/Feature} feature Feature.
|
||||
*/
|
||||
function(feature) {
|
||||
if (filter(feature)) {
|
||||
const geometry = feature.getGeometry();
|
||||
@@ -740,7 +742,7 @@ VectorSource.prototype.getExtent = function(opt_extent) {
|
||||
* `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.
|
||||
*
|
||||
* @param {string|number} id Feature identifier.
|
||||
* @return {module:ol/Feature~Feature} The feature (or `null` if not found).
|
||||
* @return {module:ol/Feature} The feature (or `null` if not found).
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeatureById = function(id) {
|
||||
@@ -752,7 +754,7 @@ VectorSource.prototype.getFeatureById = function(id) {
|
||||
/**
|
||||
* Get the format associated with this source.
|
||||
*
|
||||
* @return {module:ol/format/Feature~FeatureFormat|undefined} The feature format.
|
||||
* @return {module:ol/format/Feature|undefined} The feature format.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFormat = function() {
|
||||
@@ -786,11 +788,11 @@ VectorSource.prototype.getUrl = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/events/Event~Event} event Event.
|
||||
* @param {module:ol/events/Event} event Event.
|
||||
* @private
|
||||
*/
|
||||
VectorSource.prototype.handleFeatureChange_ = function(event) {
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (event.target);
|
||||
const feature = /** @type {module:ol/Feature} */ (event.target);
|
||||
const featureKey = getUid(feature).toString();
|
||||
const geometry = feature.getGeometry();
|
||||
if (!geometry) {
|
||||
@@ -863,7 +865,7 @@ VectorSource.prototype.isEmpty = function() {
|
||||
/**
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
*/
|
||||
VectorSource.prototype.loadFeatures = function(extent, resolution, projection) {
|
||||
const loadedExtentsRtree = this.loadedExtentsRtree_;
|
||||
@@ -910,7 +912,7 @@ VectorSource.prototype.removeLoadedExtent = function(extent) {
|
||||
* Remove a single feature from the source. If you want to remove all features
|
||||
* at once, use the {@link module:ol/source/Vector~VectorSource#clear source.clear()} method
|
||||
* instead.
|
||||
* @param {module:ol/Feature~Feature} feature Feature to remove.
|
||||
* @param {module:ol/Feature} feature Feature to remove.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.removeFeature = function(feature) {
|
||||
@@ -929,7 +931,7 @@ VectorSource.prototype.removeFeature = function(feature) {
|
||||
|
||||
/**
|
||||
* Remove feature without firing a `change` event.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/Feature} feature Feature.
|
||||
* @protected
|
||||
*/
|
||||
VectorSource.prototype.removeFeatureInternal = function(feature) {
|
||||
@@ -950,7 +952,7 @@ VectorSource.prototype.removeFeatureInternal = function(feature) {
|
||||
/**
|
||||
* Remove a feature from the id index. Called internally when the feature id
|
||||
* may have changed.
|
||||
* @param {module:ol/Feature~Feature} feature The feature.
|
||||
* @param {module:ol/Feature} feature The feature.
|
||||
* @return {boolean} Removed the feature from the index.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
|
||||
* @property {number} [cacheSize=128] Cache size.
|
||||
* @property {module:ol/format/Feature~FeatureFormat} [format] Feature format for tiles. Used and required by the default.
|
||||
* @property {module:ol/format/Feature} [format] Feature format for tiles. Used and required by the default.
|
||||
* @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this
|
||||
* to `false` (e.g. for sources with polygons that represent administrative
|
||||
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
|
||||
@@ -23,7 +23,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* @property {module:ol/source/State~State} [state] Source state.
|
||||
* @property {module:ol/VectorTile~TileClass} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link ol.VectorTile}.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction]
|
||||
* Optional function to load a tile given a URL. Could look like this:
|
||||
* ```js
|
||||
@@ -98,14 +98,14 @@ const VectorTile = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/format/Feature~FeatureFormat}
|
||||
* @type {module:ol/format/Feature}
|
||||
*/
|
||||
this.format_ = options.format ? options.format : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, module:ol/VectorTile~VectorTile>}
|
||||
*/
|
||||
* @private
|
||||
* @type {Object.<string, module:ol/VectorTile>}
|
||||
*/
|
||||
this.sourceTiles_ = {};
|
||||
|
||||
/**
|
||||
@@ -115,15 +115,15 @@ const VectorTile = function(options) {
|
||||
this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState, string,
|
||||
* module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)}
|
||||
*/
|
||||
* @protected
|
||||
* @type {function(new: module:ol/VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState, string,
|
||||
* module:ol/format/Feature, module:ol/Tile~LoadFunction)}
|
||||
*/
|
||||
this.tileClass = options.tileClass ? options.tileClass : Tile;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, module:ol/tilegrid/TileGrid~TileGrid>}
|
||||
* @type {Object.<string, module:ol/tilegrid/TileGrid>}
|
||||
*/
|
||||
this.tileGrids_ = {};
|
||||
|
||||
@@ -154,7 +154,9 @@ VectorTile.prototype.clear = function() {
|
||||
VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
const tileCoordKey = getKeyZXY(z, x, y);
|
||||
if (this.tileCache.containsKey(tileCoordKey)) {
|
||||
return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey));
|
||||
return (
|
||||
/** @type {!module:ol/Tile} */ (this.tileCache.get(tileCoordKey))
|
||||
);
|
||||
} else {
|
||||
const tileCoord = [z, x, y];
|
||||
const urlTileCoord = this.getTileCoordForTileUrlFunction(
|
||||
|
||||
@@ -20,7 +20,7 @@ import {appendParams} from '../uri.js';
|
||||
* you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
|
||||
* access pixel data with the Canvas renderer. See
|
||||
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
|
||||
* @property {module:ol/tilegrid/WMTS~WMTSTileGrid} tileGrid Tile grid.
|
||||
* @property {module:ol/tilegrid/WMTS} tileGrid Tile grid.
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {boolean} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
||||
* Higher values can increase reprojection performance, but decrease precision.
|
||||
@@ -61,7 +61,7 @@ import {appendParams} from '../uri.js';
|
||||
* Layer source for tile data from WMTS servers.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/WMTS~Options=} options WMTS options.
|
||||
* @api
|
||||
*/
|
||||
@@ -167,7 +167,7 @@ const WMTS = function(options) {
|
||||
/**
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Higher values can increase reprojection performance, but decrease precision.
|
||||
* @property {number} [maxZoom=18] Optional max zoom level.
|
||||
* @property {number} [maxZoom=0] Optional min zoom level.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is
|
||||
* ```js
|
||||
* function(imageTile, src) {
|
||||
@@ -52,7 +52,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* TMS where `x` 0 and `y` 0 are in the bottom left can be used by
|
||||
* using the `{-y}` placeholder in the URL template, so long as the
|
||||
* source does not have a custom tile grid. In this case,
|
||||
* {@link module:ol/source/TileImage~TileImage} can be used with a `tileUrlFunction`
|
||||
* {@link module:ol/source/TileImage} can be used with a `tileUrlFunction`
|
||||
* such as:
|
||||
*
|
||||
* tileUrlFunction: function(coordinate) {
|
||||
@@ -62,7 +62,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
*
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/XYZ~Options=} opt_options XYZ options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -25,8 +25,8 @@ const TierSizeCalculation = {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {module:ol/ImageTile~ImageTile}
|
||||
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid TileGrid that the tile belongs to.
|
||||
* @extends {module:ol/ImageTile}
|
||||
* @param {module:ol/tilegrid/TileGrid} tileGrid TileGrid that the tile belongs to.
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/TileState} state State.
|
||||
* @param {string} src Image source URI.
|
||||
@@ -120,7 +120,7 @@ CustomTile.prototype.getImage = function() {
|
||||
* Imaging Protocol are supported).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @extends {module:ol/source/TileImage}
|
||||
* @param {module:ol/source/Zoomify~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
@@ -204,7 +204,7 @@ const Zoomify = function(opt_options) {
|
||||
/**
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile Coordinate.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {module:ol/proj/Projection} projection Projection.
|
||||
* @return {string|undefined} Tile URL.
|
||||
*/
|
||||
function(tileCoord, pixelRatio, projection) {
|
||||
@@ -230,7 +230,8 @@ const Zoomify = function(opt_options) {
|
||||
return localContext[p];
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const tileUrlFunction = createFromTileUrlFunctions(urls.map(createFromTemplate));
|
||||
|
||||
Reference in New Issue
Block a user