Merge pull request #8052 from fredj/jsdoc_module
More Jsdoc module fixes
This commit is contained in:
@@ -12,7 +12,7 @@ import GML3 from '../format/GML3.js';
|
||||
* @constructor
|
||||
* @param {module:ol/format/GMLBase~Options=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.format.GMLBase}
|
||||
* @extends {module:ol/format/GMLBase~GMLBase}
|
||||
* @api
|
||||
*/
|
||||
const GML = GML3;
|
||||
|
||||
@@ -27,7 +27,7 @@ const schemaLocation = GMLNS + ' http://schemas.opengis.net/gml/2.1.2/feature.xs
|
||||
*
|
||||
* @constructor
|
||||
* @param {module:ol/format/GMLBase~Options=} opt_options Optional configuration object.
|
||||
* @extends {ol.format.GMLBase}
|
||||
* @extends {module:ol/format/GMLBase~GMLBase}
|
||||
* @api
|
||||
*/
|
||||
const GML2 = function(opt_options) {
|
||||
|
||||
@@ -39,7 +39,7 @@ const schemaLocation = GMLNS +
|
||||
* @constructor
|
||||
* @param {module:ol/format/GMLBase~Options=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.format.GMLBase}
|
||||
* @extends {module:ol/format/GMLBase~GMLBase}
|
||||
* @api
|
||||
*/
|
||||
const GML3 = function(opt_options) {
|
||||
|
||||
@@ -118,7 +118,7 @@ const DEFAULT_VERSION = '1.1.0';
|
||||
* Feature format for reading and writing data in the WFS format.
|
||||
* By default, supports WFS version 1.1.0. You can pass a GML format
|
||||
* as option if you want to read a WFS that contains GML2 (WFS 1.0.0).
|
||||
* Also see {@link ol.format.GMLBase} which is used by this format.
|
||||
* Also see {@link module:ol/format/GMLBase~GMLBase} which is used by this format.
|
||||
*
|
||||
* @constructor
|
||||
* @param {module:ol/format/WFS~Options=} opt_options Optional configuration object.
|
||||
@@ -142,7 +142,7 @@ const WFS = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.format.GMLBase}
|
||||
* @type {module:ol/format/GMLBase~GMLBase}
|
||||
*/
|
||||
this.gmlFormat_ = options.gmlFormat ?
|
||||
options.gmlFormat : new GML3();
|
||||
|
||||
@@ -246,7 +246,7 @@ Parser.prototype.consume_ = function() {
|
||||
|
||||
/**
|
||||
* Tests if the given type matches the type of the current token.
|
||||
* @param {ol.format.TokenType} type Token type.
|
||||
* @param {module:ol/format/WKT~TokenType} type Token type.
|
||||
* @return {boolean} Whether the token matches the given type.
|
||||
*/
|
||||
Parser.prototype.isTokenType = function(type) {
|
||||
@@ -257,7 +257,7 @@ Parser.prototype.isTokenType = function(type) {
|
||||
|
||||
/**
|
||||
* If the given type matches the current token, consume it.
|
||||
* @param {ol.format.TokenType} type Token type.
|
||||
* @param {module:ol/format/WKT~TokenType} type Token type.
|
||||
* @return {boolean} Whether the token matches the given type.
|
||||
*/
|
||||
Parser.prototype.match = function(type) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import {get as getProjection} from '../proj.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Array.<function(new: module:ol/format/Feature~FeatureFormat)>} [formatConstructors] Format constructors.
|
||||
* @property {ol.source.Vector} [source] Optional vector source where features will be added. If a source is provided
|
||||
* @property {module:ol/source/Vector~VectorSource} [source] Optional vector source where features will be added. If a source is provided
|
||||
* all existing features will be removed and new features will be added when
|
||||
* they are dropped on the target. If you want to add features to a vector
|
||||
* source without removing the existing features (append only), instead of
|
||||
@@ -120,7 +120,7 @@ const DragAndDrop = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.source.Vector}
|
||||
* @type {module:ol/source/Vector~VectorSource}
|
||||
*/
|
||||
this.source_ = options.source || null;
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ BaseLayer.prototype.getOpacity = function() {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @return {ol.source.State} Source state.
|
||||
* @return {module:ol/source/State~State} Source state.
|
||||
*/
|
||||
BaseLayer.prototype.getSourceState = function() {};
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import Style from '../style/Style.js';
|
||||
* @property {string|function(module:ol/Feature~Feature):number} [weight='weight'] The feature
|
||||
* attribute to use for the weight or a function that returns a weight from a feature. Weight values
|
||||
* should range from 0 to 1 (and values outside will be clamped to that range).
|
||||
* @property {ol.source.Vector} [source] Source.
|
||||
* @property {module:ol/source/Vector~VectorSource} [source] Source.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import Layer from '../layer/Layer.js';
|
||||
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
||||
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
||||
* use {@link ol.Map#addLayer}.
|
||||
* @property {ol.source.Image} [source] Source for this layer.
|
||||
* @property {module:ol/source/Image~ImageSource} [source] Source for this layer.
|
||||
*/
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ inherits(ImageLayer, Layer);
|
||||
|
||||
|
||||
/**
|
||||
* Return the associated {@link ol.source.Image source} of the image layer.
|
||||
* Return the associated {@link module:ol/source/Image~ImageSource source} of the image layer.
|
||||
* @function
|
||||
* @return {ol.source.Image} Source.
|
||||
* @return {module:ol/source/Image~ImageSource} Source.
|
||||
* @api
|
||||
*/
|
||||
ImageLayer.prototype.getSource;
|
||||
|
||||
@@ -24,7 +24,7 @@ import SourceState from '../source/State.js';
|
||||
* visible.
|
||||
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
||||
* be visible.
|
||||
* @property {ol.source.Source} [source] Source for this layer. If not provided to the constructor,
|
||||
* @property {module:ol/source/Source~Source} [source] Source for this layer. If not provided to the constructor,
|
||||
* the source can be set by calling {@link ol.layer.Layer#setSource layer.setSource(source)} after
|
||||
* construction.
|
||||
*/
|
||||
@@ -142,13 +142,13 @@ Layer.prototype.getLayerStatesArray = function(opt_states) {
|
||||
|
||||
/**
|
||||
* Get the layer source.
|
||||
* @return {ol.source.Source} The layer source (or `null` if not yet set).
|
||||
* @return {module:ol/source/Source~Source} The layer source (or `null` if not yet set).
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
Layer.prototype.getSource = function() {
|
||||
const source = this.get(LayerProperty.SOURCE);
|
||||
return /** @type {ol.source.Source} */ (source) || null;
|
||||
return /** @type {module:ol/source/Source~Source} */ (source) || null;
|
||||
};
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ Layer.prototype.setMap = function(map) {
|
||||
|
||||
/**
|
||||
* Set the layer source.
|
||||
* @param {ol.source.Source} source The layer source.
|
||||
* @param {module:ol/source/Source~Source} source The layer source.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.
|
||||
* texts are always rotated with the view and pixels are scaled during zoom animations.
|
||||
* * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering even during
|
||||
* animations, but slower performance.
|
||||
* @property {ol.source.Vector} [source] Source.
|
||||
* @property {module:ol/source/Vector~VectorSource} [source] Source.
|
||||
* @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
|
||||
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
||||
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
||||
@@ -181,9 +181,9 @@ VectorLayer.prototype.getRenderOrder = function() {
|
||||
|
||||
|
||||
/**
|
||||
* Return the associated {@link ol.source.Vector vectorsource} of the layer.
|
||||
* Return the associated {@link module:ol/source/Vector~VectorSource vectorsource} of the layer.
|
||||
* @function
|
||||
* @return {ol.source.Vector} Source.
|
||||
* @return {module:ol/source/Vector~VectorSource} Source.
|
||||
* @api
|
||||
*/
|
||||
VectorLayer.prototype.getSource;
|
||||
|
||||
@@ -40,7 +40,7 @@ import {assign} from '../obj.js';
|
||||
* animations, but slower performance than the other options.
|
||||
*
|
||||
* When `declutter` is set to `true`, `'hybrid'` will be used instead of `'image'`.
|
||||
* @property {ol.source.VectorTile} [source] Source.
|
||||
* @property {module:ol/source/VectorTile~VectorTile} [source] Source.
|
||||
* @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
|
||||
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
||||
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
||||
@@ -161,9 +161,9 @@ VectorTileLayer.prototype.setUseInterimTilesOnError = function(useInterimTilesOn
|
||||
|
||||
|
||||
/**
|
||||
* Return the associated {@link ol.source.VectorTile vectortilesource} of the layer.
|
||||
* Return the associated {@link module:ol/source/VectorTile~VectorTile vectortilesource} of the layer.
|
||||
* @function
|
||||
* @return {ol.source.VectorTile} Source.
|
||||
* @return {module:ol/source/VectorTile~VectorTile} Source.
|
||||
* @api
|
||||
*/
|
||||
VectorTileLayer.prototype.getSource;
|
||||
|
||||
@@ -128,7 +128,7 @@ CanvasVectorLayerRenderer.prototype.composeFrame = function(frameState, layerSta
|
||||
const projection = viewState.projection;
|
||||
const rotation = viewState.rotation;
|
||||
const projectionExtent = projection.getExtent();
|
||||
const vectorSource = /** @type {ol.source.Vector} */ (this.getLayer().getSource());
|
||||
const vectorSource = /** @type {module:ol/source/Vector~VectorSource} */ (this.getLayer().getSource());
|
||||
|
||||
let transform = this.getTransform(frameState, 0);
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
|
||||
return;
|
||||
}
|
||||
|
||||
const source = /** @type {ol.source.VectorTile} */ (layer.getSource());
|
||||
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
|
||||
const sourceTileGrid = source.getTileGrid();
|
||||
const tileGrid = source.getTileGridForProjection(projection);
|
||||
const resolution = tileGrid.getResolution(tile.tileCoord[0]);
|
||||
@@ -269,7 +269,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
/** @type {Array.<module:ol/VectorImageTile~VectorImageTile>} */
|
||||
const renderedTiles = this.renderedTiles;
|
||||
|
||||
const source = /** @type {ol.source.VectorTile} */ (layer.getSource());
|
||||
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
|
||||
const tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
|
||||
let bufferedExtent, found;
|
||||
let i, ii, replayGroup;
|
||||
@@ -314,7 +314,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
*/
|
||||
CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function(tile, frameState) {
|
||||
const layer = this.getLayer();
|
||||
const source = /** @type {ol.source.VectorTile} */ (layer.getSource());
|
||||
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
|
||||
const tileGrid = source.getTileGrid();
|
||||
const tileCoord = tile.tileCoord;
|
||||
const tileResolution = tileGrid.getResolution(tileCoord[0]);
|
||||
@@ -363,7 +363,7 @@ CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function(event
|
||||
CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameState, layerState) {
|
||||
const layer = this.getLayer();
|
||||
const declutterReplays = layer.getDeclutter() ? {} : null;
|
||||
const source = /** @type {ol.source.VectorTile} */ (layer.getSource());
|
||||
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
|
||||
const renderMode = layer.getRenderMode();
|
||||
const replayTypes = VECTOR_REPLAYS[renderMode];
|
||||
const pixelRatio = frameState.pixelRatio;
|
||||
@@ -488,7 +488,7 @@ CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function(
|
||||
const tileCoord = tile.wrappedTileCoord;
|
||||
const z = tileCoord[0];
|
||||
const pixelRatio = frameState.pixelRatio;
|
||||
const source = /** @type {ol.source.VectorTile} */ (layer.getSource());
|
||||
const source = /** @type {module:ol/source/VectorTile~VectorTile} */ (layer.getSource());
|
||||
const tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
|
||||
const resolution = tileGrid.getResolution(z);
|
||||
const context = tile.getContext(layer);
|
||||
|
||||
@@ -20,7 +20,7 @@ import Triangulation from '../reproj/Triangulation.js';
|
||||
/**
|
||||
* @classdesc
|
||||
* Class encapsulating single reprojected image.
|
||||
* See {@link ol.source.Image}.
|
||||
* See {@link module:ol/source/Image~ImageSource}.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/ImageBase~ImageBase}
|
||||
|
||||
@@ -21,7 +21,7 @@ import Triangulation from '../reproj/Triangulation.js';
|
||||
/**
|
||||
* @classdesc
|
||||
* Class encapsulating single reprojected tile.
|
||||
* See {@link ol.source.TileImage}.
|
||||
* See {@link module:ol/source/TileImage~TileImage}.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/Tile~Tile}
|
||||
|
||||
@@ -37,7 +37,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Layer source for Bing Maps tile data.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {module:ol/source/BingMaps~Options=} options Bing Maps options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@ import XYZ from '../source/XYZ.js';
|
||||
* Layer source for the CartoDB Maps API.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.XYZ}
|
||||
* @extends {module:ol/source/XYZ~XYZ}
|
||||
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,7 @@ import VectorSource from '../source/Vector.js';
|
||||
* @typedef {Object} Options
|
||||
* @property {ol.AttributionLike} [attributions] Attributions.
|
||||
* @property {number} [distance=20] Minimum distance in pixels between clusters.
|
||||
* @property {ol.Extent} [extent] Extent.
|
||||
* @property {module:ol/extent~Extent} [extent] Extent.
|
||||
* @property {ol.format.Feature} [format] Format.
|
||||
* @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
|
||||
@@ -32,7 +32,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 {ol.source.Vector} source Source.
|
||||
* @property {module:ol/source/Vector~VectorSource} source Source.
|
||||
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ import VectorSource from '../source/Vector.js';
|
||||
*
|
||||
* @constructor
|
||||
* @param {module:ol/source/Cluster~Options=} options Cluster options.
|
||||
* @extends {ol.source.Vector}
|
||||
* @extends {module:ol/source/Vector~VectorSource}
|
||||
* @api
|
||||
*/
|
||||
const Cluster = function(options) {
|
||||
@@ -87,7 +87,7 @@ const Cluster = function(options) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @type {ol.source.Vector}
|
||||
* @type {module:ol/source/Vector~VectorSource}
|
||||
* @protected
|
||||
*/
|
||||
this.source = options.source;
|
||||
@@ -110,7 +110,7 @@ Cluster.prototype.getDistance = function() {
|
||||
|
||||
/**
|
||||
* Get a reference to the wrapped source.
|
||||
* @return {ol.source.Vector} Source.
|
||||
* @return {module:ol/source/Vector~VectorSource} Source.
|
||||
* @api
|
||||
*/
|
||||
Cluster.prototype.getSource = function() {
|
||||
|
||||
@@ -43,7 +43,7 @@ const ImageSourceEventType = {
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.source.Image} instances are instances of this
|
||||
* Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
@@ -73,7 +73,7 @@ inherits(ImageSourceEvent, Event);
|
||||
* @property {module:ol/extent~Extent} [extent]
|
||||
* @property {module:ol/proj~ProjectionLike} projection
|
||||
* @property {Array.<number>} [resolutions]
|
||||
* @property {ol.source.State} [state]
|
||||
* @property {module:ol/source/State~State} [state]
|
||||
*/
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ inherits(ImageSourceEvent, Event);
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.source.Source}
|
||||
* @extends {module:ol/source/Source~Source}
|
||||
* @param {module:ol/source/Image~Options} options Single image source options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@ import {appendParams} from '../uri.js';
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Image.Event
|
||||
* @extends {ol.source.Image}
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -11,9 +11,9 @@ import ImageSource from '../source/Image.js';
|
||||
* @property {ol.AttributionLike} [attributions] Attributions.
|
||||
* @property {ol.CanvasFunctionType} [canvasFunction] Canvas function.
|
||||
* The function returning the canvas element used by the source
|
||||
* as an image. The arguments passed to the function are: `{ol.Extent}` the
|
||||
* as an image. The arguments passed to the function are: `{module:ol/extent~Extent}` the
|
||||
* image extent, `{number}` the image resolution, `{number}` the device pixel
|
||||
* ratio, `{ol.Size}` the image size, and `{module:ol/proj/Projection~Projection}` the image
|
||||
* ratio, `{module:ol/size~Size}` the image size, and `{module:ol/proj/Projection~Projection}` the image
|
||||
* projection. The canvas returned by this function is cached by the source. If
|
||||
* the value returned by the function is later changed then
|
||||
* `changed` should be called on the source for the source to
|
||||
@@ -23,7 +23,7 @@ import ImageSource from '../source/Image.js';
|
||||
* width and height of the map viewport, and so on. Must be `1` or higher.
|
||||
* @property {Array.<number>} [resolutions] Resolutions.
|
||||
* If specified, new canvases will be created for these resolutions
|
||||
* @property {ol.source.State} [state] Source state.
|
||||
* @property {module:ol/source/State~State} [state] Source state.
|
||||
*/
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import ImageSource from '../source/Image.js';
|
||||
* Base class for image sources where a canvas element is the image.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.Image}
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @param {module:ol/source/ImageCanvas~Options=} options ImageCanvas options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ import {appendParams} from '../uri.js';
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Image.Event
|
||||
* @extends {ol.source.Image}
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -18,11 +18,11 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.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 {ol.Extent} [imageExtent] Extent of the image in map coordinates.
|
||||
* @property {module:ol/extent~Extent} [imageExtent] Extent of the image in map coordinates.
|
||||
* This is the [left, bottom, right, top] map coordinates of your image.
|
||||
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {ol.Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this
|
||||
* @property {module:ol/size~Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this
|
||||
* only needs to be set if auto-detection fails for some reason.
|
||||
* @property {string} url Image URL.
|
||||
*/
|
||||
@@ -33,7 +33,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
|
||||
* A layer source for displaying a single, static image.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.Image}
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @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 {ol.source.Image}
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ export const ATTRIBUTION = '© ' +
|
||||
* Layer source for the OpenStreetMap tile server.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.XYZ}
|
||||
* @extends {module:ol/source/XYZ~XYZ}
|
||||
* @param {module:ol/source/OSM~Options=} [opt_options] Open Street Map options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,7 @@ inherits(RasterSourceEvent, Event);
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Array.<ol.source.Source>} sources Input sources.
|
||||
* @property {Array.<module:ol/source/Source~Source>} sources Input sources.
|
||||
* @property {ol.RasterOperation} [operation] Raster operation.
|
||||
* The operation will be called with data from input sources
|
||||
* and the output will be assigned to the raster source.
|
||||
@@ -109,7 +109,7 @@ inherits(RasterSourceEvent, Event);
|
||||
* output pixel values.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.Image}
|
||||
* @extends {module:ol/source/Image~ImageSource}
|
||||
* @fires ol.source.Raster.Event
|
||||
* @param {module:ol/source/Raster~Options=} options Options.
|
||||
* @api
|
||||
@@ -436,7 +436,7 @@ function getLayerStatesArray(renderers) {
|
||||
|
||||
/**
|
||||
* Create renderers for all sources.
|
||||
* @param {Array.<ol.source.Source>} sources The sources.
|
||||
* @param {Array.<module:ol/source/Source~Source>} sources The sources.
|
||||
* @return {Array.<ol.renderer.canvas.Layer>} Array of layer renderers.
|
||||
*/
|
||||
function createRenderers(sources) {
|
||||
@@ -451,7 +451,7 @@ function createRenderers(sources) {
|
||||
|
||||
/**
|
||||
* Create a renderer for the provided source.
|
||||
* @param {ol.source.Source} source The source.
|
||||
* @param {module:ol/source/Source~Source} source The source.
|
||||
* @return {ol.renderer.canvas.Layer} The renderer.
|
||||
*/
|
||||
function createRenderer(source) {
|
||||
@@ -467,7 +467,7 @@ function createRenderer(source) {
|
||||
|
||||
/**
|
||||
* Create an image renderer for the provided source.
|
||||
* @param {ol.source.Image} source The source.
|
||||
* @param {module:ol/source/Image~ImageSource} source The source.
|
||||
* @return {ol.renderer.canvas.Layer} The renderer.
|
||||
*/
|
||||
function createImageRenderer(source) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import SourceState from '../source/State.js';
|
||||
* @typedef {Object} Options
|
||||
* @property {ol.AttributionLike} [attributions]
|
||||
* @property {module:ol/proj~ProjectionLike} projection
|
||||
* @property {ol.source.State} [state]
|
||||
* @property {module:ol/source/State~State} [state]
|
||||
* @property {boolean} [wrapX]
|
||||
*/
|
||||
|
||||
@@ -49,7 +49,7 @@ const Source = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.source.State}
|
||||
* @type {module:ol/source/State~State}
|
||||
*/
|
||||
this.state_ = options.state !== undefined ?
|
||||
options.state : SourceState.READY;
|
||||
@@ -129,8 +129,8 @@ Source.prototype.getResolutions = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* Get the state of the source, see {@link ol.source.State} for possible states.
|
||||
* @return {ol.source.State} State.
|
||||
* Get the state of the source, see {@link module:ol/source/State~State} for possible states.
|
||||
* @return {module:ol/source/State~State} State.
|
||||
* @api
|
||||
*/
|
||||
Source.prototype.getState = function() {
|
||||
@@ -170,7 +170,7 @@ Source.prototype.setAttributions = function(attributions) {
|
||||
|
||||
/**
|
||||
* Set the state of the source.
|
||||
* @param {ol.source.State} state State.
|
||||
* @param {module:ol/source/State~State} state State.
|
||||
* @protected
|
||||
*/
|
||||
Source.prototype.setState = function(state) {
|
||||
|
||||
@@ -114,7 +114,7 @@ const ProviderConfig = {
|
||||
* Layer source for the Stamen tile server.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.XYZ}
|
||||
* @extends {module:ol/source/XYZ~XYZ}
|
||||
* @param {module:ol/source/Stamen~Options=} options Stamen options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -20,8 +20,8 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
|
||||
* @property {boolean} [opaque]
|
||||
* @property {number} [tilePixelRatio]
|
||||
* @property {module:ol/proj~ProjectionLike} [projection]
|
||||
* @property {ol.source.State} [state]
|
||||
* @property {ol.tilegrid.TileGrid} [tileGrid]
|
||||
* @property {module:ol/source/State~State} [state]
|
||||
* @property {module:ol/tilegrid/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 {ol.source.Source}
|
||||
* @extends {module:ol/source/Source~Source}
|
||||
* @param {module:ol/source/Tile~Options=} options SourceTile source options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -16,10 +16,10 @@ import {appendParams} from '../uri.js';
|
||||
* Services are supported.
|
||||
*
|
||||
* For cached ArcGIS services, better performance is available using the
|
||||
* {@link ol.source.XYZ} data source.
|
||||
* {@link module:ol/source/XYZ~XYZ} data source.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {olx.source.TileArcGISRestOptions=} opt_options Tile ArcGIS Rest
|
||||
* options.
|
||||
* @api
|
||||
|
||||
@@ -78,7 +78,7 @@ LabeledTile.prototype.load = function() {};
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/source/TileImage
|
||||
* @module module:ol/source/TileImage~TileImage
|
||||
*/
|
||||
import {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';
|
||||
import {getUid, inherits} from '../index.js';
|
||||
@@ -26,12 +26,12 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
|
||||
* @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.
|
||||
* @property {ol.source.State} [state] Source state.
|
||||
* @property {function(new: ol.ImageTile, ol.TileCoord,
|
||||
* ol.TileState, string, ?string,
|
||||
* @property {module:ol/source/State~State} [state] Source state.
|
||||
* @property {function(new: module:ol/ImageTile~ImageTile, module:ol/tilecoord~TileCoord,
|
||||
* module:ol/TileState~TileState, string, ?string,
|
||||
* ol.TileLoadFunctionType)} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link ol.ImageTile}.
|
||||
* @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid.
|
||||
* Default is {@link module:ol/ImageTile~ImageTile}.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {ol.TileLoadFunctionType} [tileLoadFunction] Optional function to load a tile given a URL. The default is
|
||||
* ```js
|
||||
* function(imageTile, src) {
|
||||
|
||||
@@ -49,7 +49,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Layer source for tile data in TileJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {module:ol/source/TileJSON~Options=} options TileJSON options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -43,11 +43,11 @@ import {appendParams} from '../uri.js';
|
||||
* @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.
|
||||
* @property {function(new: ol.ImageTile, ol.TileCoord,
|
||||
* ol.TileState, string, ?string,
|
||||
* @property {function(new: module:ol/ImageTile~ImageTile, module:ol/tilecoord~TileCoord,
|
||||
* module:ol/TileState~TileState, string, ?string,
|
||||
* ol.TileLoadFunctionType)} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link ol.ImageTile}.
|
||||
* @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
|
||||
* Default is {@link module:ol/ImageTile~ImageTile}.
|
||||
* @property {module:ol/tilegrid/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
|
||||
@@ -78,7 +78,7 @@ import {appendParams} from '../uri.js';
|
||||
* Layer source for tile data from WMS servers.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {module:ol/source/TileWMS~Options=} [opt_options] Tile WMS options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,8 @@ import {getKeyZXY} from '../tilecoord.js';
|
||||
* @property {module:ol/extent~Extent} [extent]
|
||||
* @property {boolean} [opaque]
|
||||
* @property {module:ol/proj~ProjectionLike} [projection]
|
||||
* @property {ol.source.State} [state]
|
||||
* @property {ol.tilegrid.TileGrid} [tileGrid]
|
||||
* @property {module:ol/source/State~State} [state]
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid]
|
||||
* @property {module:ol/Tile~LoadFunction} tileLoadFunction
|
||||
* @property {number} [tilePixelRatio]
|
||||
* @property {module:ol/Tile~UrlFunction} [tileUrlFunction]
|
||||
|
||||
@@ -24,7 +24,7 @@ import RBush from '../structs/RBush.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.source.Vector} instances are instances of this
|
||||
* Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
@@ -54,7 +54,7 @@ inherits(VectorSourceEvent, Event);
|
||||
* @property {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>} [features]
|
||||
* Features. If provided as {@link ol.Collection}, the features in the source
|
||||
* and the collection will stay in sync.
|
||||
* @property {ol.format.Feature} [format] The feature format used by the XHR
|
||||
* @property {module:ol/format/Feature~FeatureFormat} [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.
|
||||
@@ -64,7 +64,7 @@ inherits(VectorSourceEvent, Event);
|
||||
* Example:
|
||||
*
|
||||
* ```js
|
||||
* var vectorSource = new ol.source.Vector({
|
||||
* var vectorSource = new module:ol/source/Vector~VectorSource({
|
||||
* format: new ol.format.GeoJSON(),
|
||||
* loader: function(extent, resolution, projection) {
|
||||
* var proj = projection.getCode();
|
||||
@@ -119,15 +119,15 @@ inherits(VectorSourceEvent, Event);
|
||||
* `false` may improve performance.
|
||||
*
|
||||
* Note that
|
||||
* {@link ol.source.Vector#getFeaturesInExtent},
|
||||
* {@link ol.source.Vector#getClosestFeatureToCoordinate} and
|
||||
* {@link ol.source.Vector#getExtent} cannot be used when `useSpatialIndex` is
|
||||
* set to `false`, and {@link ol.source.Vector#forEachFeatureInExtent} will loop
|
||||
* {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},
|
||||
* {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and
|
||||
* {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is
|
||||
* set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop
|
||||
* through all features.
|
||||
*
|
||||
* When set to `false`, the features will be maintained in an
|
||||
* {@link ol.Collection}, which can be retrieved through
|
||||
* {@link ol.source.Vector#getFeaturesCollection}.
|
||||
* {@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
|
||||
* resulting geometry coordinates will then exceed the world bounds.
|
||||
@@ -137,11 +137,11 @@ inherits(VectorSourceEvent, Event);
|
||||
/**
|
||||
* @classdesc
|
||||
* Provides a source of features for vector layers. Vector features provided
|
||||
* by this source are suitable for editing. See {@link ol.source.VectorTile} for
|
||||
* by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for
|
||||
* vector data that is optimized for rendering.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.Source}
|
||||
* @extends {module:ol/source/Source~Source}
|
||||
* @fires ol.source.Vector.Event
|
||||
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
|
||||
* @api
|
||||
@@ -266,7 +266,7 @@ inherits(VectorSource, Source);
|
||||
|
||||
/**
|
||||
* Add a single feature to the source. If you want to add a batch of features
|
||||
* at once, call {@link ol.source.Vector#addFeatures source.addFeatures()}
|
||||
* at once, call {@link module:ol/source/Vector~VectorSource#addFeatures source.addFeatures()}
|
||||
* 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.
|
||||
@@ -536,11 +536,11 @@ VectorSource.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, c
|
||||
* value, iteration will stop and the function will return the same value.
|
||||
*
|
||||
* If you are interested in features whose geometry intersects an extent, call
|
||||
* the {@link ol.source.Vector#forEachFeatureIntersectingExtent
|
||||
* the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent
|
||||
* source.forEachFeatureIntersectingExtent()} method instead.
|
||||
*
|
||||
* When `useSpatialIndex` is set to false, this method will loop through all
|
||||
* features, equivalent to {@link ol.source.Vector#forEachFeature}.
|
||||
* 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
|
||||
@@ -564,7 +564,7 @@ VectorSource.prototype.forEachFeatureInExtent = function(extent, callback) {
|
||||
* value, iteration will stop and the function will return the same value.
|
||||
*
|
||||
* If you only want to test for bounding box intersection, call the
|
||||
* {@link ol.source.Vector#forEachFeatureInExtent
|
||||
* {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent
|
||||
* source.forEachFeatureInExtent()} method instead.
|
||||
*
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
@@ -899,7 +899,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 ol.source.Vector#clear source.clear()} method
|
||||
* at once, use the {@link module:ol/source/Vector~VectorSource#clear source.clear()} method
|
||||
* instead.
|
||||
* @param {module:ol/Feature~Feature} feature Feature to remove.
|
||||
* @api
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {inherits} from '../index.js';
|
||||
import TileState from '../TileState.js';
|
||||
import VectorImageTile, {defaultLoadFunction} from '../VectorImageTile.js';
|
||||
import VectorTile from '../VectorTile.js';
|
||||
import Tile from '../VectorTile.js';
|
||||
import {toSize} from '../size.js';
|
||||
import UrlTile from '../source/UrlTile.js';
|
||||
import {getKeyZXY} from '../tilecoord.js';
|
||||
@@ -14,18 +14,18 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* @typedef {Object} Options
|
||||
* @property {ol.AttributionLike} [attributions] Attributions.
|
||||
* @property {number} [cacheSize=128] Cache size.
|
||||
* @property {ol.format.Feature} [format] Feature format for tiles. Used and required by the default.
|
||||
* @property {module:ol/format/Feature~FeatureFormat} [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
|
||||
* stroke operations.
|
||||
* @property {module:ol/proj~ProjectionLike} projection Projection.
|
||||
* @property {ol.source.State} [state] Source state.
|
||||
* @property {function(new: ol.VectorTile, ol.TileCoord,
|
||||
* ol.TileState, string, ?string,
|
||||
* @property {module:ol/source/State~State} [state] Source state.
|
||||
* @property {function(new: ol.VectorTile, module:ol/tilecoord~TileCoord,
|
||||
* module:ol/TileState~TileState, string, ?string,
|
||||
* ol.TileLoadFunctionType)} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link ol.VectorTile}.
|
||||
* @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {ol.TileLoadFunctionType} [tileLoadFunction]
|
||||
* Optional function to load a tile given a URL. Could look like this:
|
||||
* ```js
|
||||
@@ -61,7 +61,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* with vector features from the server, it is not meant for feature editing.
|
||||
* Features are optimized for rendering, their geometries are clipped at or near
|
||||
* tile boundaries and simplified for a view resolution. See
|
||||
* {@link ol.source.Vector} for vector sources that are suitable for feature
|
||||
* {@link module:ol/source/Vector~VectorSource} for vector sources that are suitable for feature
|
||||
* editing.
|
||||
*
|
||||
* @constructor
|
||||
@@ -70,7 +70,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* @param {module:ol/source/VectorTile~Options=} options Vector tile options.
|
||||
* @api
|
||||
*/
|
||||
const VectorTileSource = function(options) {
|
||||
const VectorTile = function(options) {
|
||||
const projection = options.projection || 'EPSG:3857';
|
||||
|
||||
const extent = options.extent || extentFromProjection(projection);
|
||||
@@ -121,7 +121,7 @@ const VectorTileSource = function(options) {
|
||||
* @type {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
|
||||
* module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)}
|
||||
*/
|
||||
this.tileClass = options.tileClass ? options.tileClass : VectorTile;
|
||||
this.tileClass = options.tileClass ? options.tileClass : Tile;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -131,13 +131,13 @@ const VectorTileSource = function(options) {
|
||||
|
||||
};
|
||||
|
||||
inherits(VectorTileSource, UrlTile);
|
||||
inherits(VectorTile, UrlTile);
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean} The source can have overlapping geometries.
|
||||
*/
|
||||
VectorTileSource.prototype.getOverlaps = function() {
|
||||
VectorTile.prototype.getOverlaps = function() {
|
||||
return this.overlaps_;
|
||||
};
|
||||
|
||||
@@ -145,7 +145,7 @@ VectorTileSource.prototype.getOverlaps = function() {
|
||||
* clear {@link module:ol/TileCache~TileCache} and delete all source tiles
|
||||
* @api
|
||||
*/
|
||||
VectorTileSource.prototype.clear = function() {
|
||||
VectorTile.prototype.clear = function() {
|
||||
this.tileCache.clear();
|
||||
this.sourceTiles_ = {};
|
||||
};
|
||||
@@ -153,7 +153,7 @@ VectorTileSource.prototype.clear = function() {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
VectorTileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
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));
|
||||
@@ -180,7 +180,7 @@ VectorTileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
VectorTileSource.prototype.getTileGridForProjection = function(projection) {
|
||||
VectorTile.prototype.getTileGridForProjection = function(projection) {
|
||||
const code = projection.getCode();
|
||||
let tileGrid = this.tileGrids_[code];
|
||||
if (!tileGrid) {
|
||||
@@ -197,7 +197,7 @@ VectorTileSource.prototype.getTileGridForProjection = function(projection) {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
VectorTileSource.prototype.getTilePixelRatio = function(pixelRatio) {
|
||||
VectorTile.prototype.getTilePixelRatio = function(pixelRatio) {
|
||||
return pixelRatio;
|
||||
};
|
||||
|
||||
@@ -205,9 +205,9 @@ VectorTileSource.prototype.getTilePixelRatio = function(pixelRatio) {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
VectorTileSource.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
|
||||
VectorTile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
|
||||
const tileGrid = this.getTileGridForProjection(projection);
|
||||
const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);
|
||||
return [Math.round(tileSize[0] * pixelRatio), Math.round(tileSize[1] * pixelRatio)];
|
||||
};
|
||||
export default VectorTileSource;
|
||||
export default VectorTile;
|
||||
|
||||
@@ -20,16 +20,16 @@ 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 {ol.tilegrid.WMTS} tileGrid Tile grid.
|
||||
* @property {module:ol/tilegrid/WMTS~WMTSTileGrid} 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.
|
||||
* @property {ol.source.WMTSRequestEncoding|string} [requestEncoding='KVP'] Request encoding.
|
||||
* @property {string} layer Layer name as advertised in the WMTS capabilities.
|
||||
* @property {string} style Style name as advertised in the WMTS capabilities.
|
||||
* @property {function(new: ol.ImageTile, ol.TileCoord,
|
||||
* ol.TileState, string, ?string,
|
||||
* ol.TileLoadFunctionType)} [tileClass] Class used to instantiate image tiles. Default is {@link ol.ImageTile}.
|
||||
* @property {function(new: module:ol/ImageTile~ImageTile, module:ol/tilecoord~TileCoord,
|
||||
* module:ol/TileState~TileState, string, ?string,
|
||||
* ol.TileLoadFunctionType)} [tileClass] Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.
|
||||
* @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.
|
||||
* For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px
|
||||
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
|
||||
@@ -55,43 +55,6 @@ import {appendParams} from '../uri.js';
|
||||
* @property {boolean} [wrapX=false] Whether to wrap the world horizontally.
|
||||
* @property {number} [transition] Duration of the opacity transition for rendering.
|
||||
* To disable the opacity transition, pass `transition: 0`.
|
||||
|
||||
|
||||
* At least a `LAYERS` param is required. `STYLES` is
|
||||
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
||||
* and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.
|
||||
* @property {number} [gutter=0]
|
||||
* The size in pixels of the gutter around image tiles to ignore. By setting
|
||||
* this property to a non-zero value, images will be requested that are wider
|
||||
* and taller than the tile size by a value of `2 x gutter`.
|
||||
* Using a non-zero value allows artifacts of rendering at tile edges to be
|
||||
* ignored. If you control the WMS service it is recommended to address
|
||||
* "artifacts at tile edges" issues by properly configuring the WMS service. For
|
||||
* example, MapServer has a `tile_map_edge_buffer` configuration parameter for
|
||||
* this. See http://mapserver.org/output/tile_mode.html.
|
||||
* @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
|
||||
* the image from the remote server.
|
||||
* @property {function(new: ol.ImageTile, ol.TileCoord,
|
||||
* ol.TileState, string, ?string,
|
||||
* ol.TileLoadFunctionType)} [tileClass] Class used to instantiate image tiles.
|
||||
* Default is {@link ol.ImageTile}.
|
||||
* @property {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
|
||||
* extent with origin at 0,0 will be used..
|
||||
* @property {ol.source.WMSServerType|string} [serverType]
|
||||
* The type of the remote WMS server. Currently only used when `hidpi` is
|
||||
* `true`.
|
||||
* @property {string} [url] WMS service URL.
|
||||
* @property {Array.<string>} [urls] WMS service urls.
|
||||
* Use this instead of `url` when the WMS supports multiple urls for GetMap requests.
|
||||
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
|
||||
* When set to `false`, only one world
|
||||
* will be rendered. When `true`, tiles will be requested for one world only,
|
||||
* but they will be wrapped horizontally to render multiple worlds.
|
||||
* @property {number} [transition] Duration of the opacity transition for rendering.
|
||||
* To disable the opacity transition, pass `transition: 0`.
|
||||
*/
|
||||
|
||||
|
||||
@@ -100,7 +63,7 @@ import {appendParams} from '../uri.js';
|
||||
* Layer source for tile data from WMTS servers.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {module:ol/source/WMTS~Options=} options WMTS options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -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 {ol.tilegrid.WMTS} tileGrid Tile grid.
|
||||
* @property {module:ol/tilegrid/TileGrid~TileGrid} [tileGrid] Tile grid.
|
||||
* @property {ol.TileLoadFunctionType} [tileLoadFunction] Optional function to load a tile given a URL. The default is
|
||||
* ```js
|
||||
* function(imageTile, src) {
|
||||
@@ -30,7 +30,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px
|
||||
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
|
||||
* should be set to `2`.
|
||||
* @property {number|ol.Size} [tileSize=[256, 256]] The tile size used by the tile service.
|
||||
* @property {number|module:ol/size~Size} [tileSize=[256, 256]] The tile size used by the tile service.
|
||||
* @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get
|
||||
* tile URL given a tile coordinate and the projection.
|
||||
* Required if url or urls are not provided.
|
||||
@@ -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 ol.source.TileImage} can be used with a `tileUrlFunction`
|
||||
* {@link module:ol/source/TileImage~TileImage} can be used with a `tileUrlFunction`
|
||||
* such as:
|
||||
*
|
||||
* tileUrlFunction: function(coordinate) {
|
||||
@@ -62,7 +62,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
*
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {module:ol/source/XYZ~Options=} opt_options XYZ options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -102,8 +102,8 @@ CustomTile.prototype.getImage = function() {
|
||||
* A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
|
||||
* used instead of defining each one separately in the `urls` option.
|
||||
* @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.
|
||||
* @property {ol.Size} [size] Size of the image.
|
||||
* @property {ol.Extent} [extent] Extent for the TileGrid that is created.
|
||||
* @property {module:ol/size~Size} [size] Size of the image.
|
||||
* @property {module:ol/extent~Extent} [extent] Extent for the TileGrid that is created.
|
||||
* Default sets the TileGrid in the
|
||||
* fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the
|
||||
* extent to the first quadrant (the default for OpenLayers 2) set the extent
|
||||
@@ -120,7 +120,7 @@ CustomTile.prototype.getImage = function() {
|
||||
* Imaging Protocol are supported).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.TileImage}
|
||||
* @extends {module:ol/source/TileImage~TileImage}
|
||||
* @param {module:ol/source/Zoomify~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user