Merge pull request #8012 from fredj/jsdoc_module
More Jsdoc module fixes
This commit is contained in:
@@ -63,9 +63,9 @@ import {create as createTransform, apply as applyTransform} from './transform.js
|
||||
|
||||
/**
|
||||
* @typedef {Object} AtPixelOptions
|
||||
* @property {((function(ol.layer.Layer): boolean)|undefined)} layerFilter Layer filter
|
||||
* @property {((function(module:ol/layer/Layer~Layer): boolean)|undefined)} layerFilter Layer filter
|
||||
* function. The filter function will receive one argument, the
|
||||
* {@link ol.layer.Layer layer-candidate} and it should return a boolean value.
|
||||
* {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.
|
||||
* Only layers which are visible and for which this function returns `true`
|
||||
* will be tested for features. By default, all visible layers will be tested.
|
||||
* @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels
|
||||
|
||||
@@ -26,7 +26,7 @@ import {loadFeaturesXhr} from './featureloader.js';
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/TileState~TileState} state State.
|
||||
* @param {number} sourceRevision Source revision.
|
||||
* @param {module:ol/format/Feature~Feature} format Feature format.
|
||||
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
|
||||
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
|
||||
* @param {module:ol/tilecoord~TileCoord} urlTileCoord Wrapped tile coordinate for source urls.
|
||||
* @param {module:ol/Tile~UrlFunction} tileUrlFunction Tile url function.
|
||||
@@ -36,7 +36,7 @@ import {loadFeaturesXhr} from './featureloader.js';
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
* @param {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
|
||||
* module:ol/format/Feature~Feature, module:ol/Tile~LoadFunction)} tileClass Class to
|
||||
* module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)} tileClass Class to
|
||||
* instantiate for source tiles.
|
||||
* @param {function(this: module:ol/source/VectorTile~VectorTile, module:ol/events/Event~Event)} handleTileChange
|
||||
* Function to call when a source tile's state changes.
|
||||
|
||||
@@ -11,7 +11,7 @@ import TileState from './TileState.js';
|
||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||
* @param {module:ol/TileState~TileState} state State.
|
||||
* @param {string} src Data source url.
|
||||
* @param {module:ol/format/Feature~Feature} format Feature format.
|
||||
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
|
||||
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
|
||||
* @param {module:ol/Tile~Options=} opt_options Tile options.
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ const VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/format/Feature~Feature}
|
||||
* @type {module:ol/format/Feature~FeatureFormat}
|
||||
*/
|
||||
this.format_ = format;
|
||||
|
||||
@@ -108,7 +108,7 @@ VectorTile.prototype.getExtent = function() {
|
||||
|
||||
/**
|
||||
* Get the feature format assigned for reading this tile's features.
|
||||
* @return {module:ol/format/Feature~Feature} Feature format.
|
||||
* @return {module:ol/format/Feature~FeatureFormat} Feature format.
|
||||
* @api
|
||||
*/
|
||||
VectorTile.prototype.getFormat = function() {
|
||||
|
||||
@@ -45,7 +45,7 @@ const MIN_RATIO = 0.1;
|
||||
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
|
||||
* @property {string|Element} [label='»'] Text label to use for the collapsed
|
||||
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {Array.<ol.layer.Layer>|module:ol/Collection~Collection.<ol.layer.Layer>} [layers]
|
||||
* @property {Array.<module:ol/layer/Layer~Layer>|module:ol/Collection~Collection.<module:ol/layer/Layer~Layer>} [layers]
|
||||
* Layers for the overview map. If not set, then all main map layers are used
|
||||
* instead.
|
||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
|
||||
@@ -149,7 +149,7 @@ const OverviewMap = function(opt_options) {
|
||||
if (options.layers) {
|
||||
options.layers.forEach(
|
||||
/**
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
*/
|
||||
function(layer) {
|
||||
ovmap.addLayer(layer);
|
||||
@@ -161,7 +161,7 @@ const OverviewMap = function(opt_options) {
|
||||
box.style.boxSizing = 'border-box';
|
||||
|
||||
/**
|
||||
* @type {ol.Overlay}
|
||||
* @type {module:ol/Overlay~Overlay}
|
||||
* @private
|
||||
*/
|
||||
this.boxOverlay_ = new Overlay({
|
||||
|
||||
@@ -38,7 +38,7 @@ import FormatType from './format/FormatType.js';
|
||||
|
||||
/**
|
||||
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
|
||||
* @param {module:ol/format/Feature~Feature} format Feature format.
|
||||
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
|
||||
* @param {function(this:module:ol/VectorTile~VectorTile, Array.<module:ol/Feature~Feature>, module:ol/proj/Projection~Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature~Feature>)} success
|
||||
* Function called with the loaded features and optionally with the data
|
||||
* projection. Called with the vector tile or source as `this`.
|
||||
@@ -111,7 +111,7 @@ export function loadFeaturesXhr(url, format, success, failure) {
|
||||
* loads features (with XHR), parses the features, and adds them to the
|
||||
* vector source.
|
||||
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
|
||||
* @param {module:ol/format/Feature~Feature} format Feature format.
|
||||
* @param {module:ol/format/Feature~FeatureFormat} format Feature format.
|
||||
* @return {module:ol/featureloader~FeatureLoader} The feature loader.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ GEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;
|
||||
* Feature format for reading and writing data in the EsriJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.JSONFeature}
|
||||
* @extends {module:ol/format/JSONFeature~JSONFeature}
|
||||
* @param {module:ol/format/EsriJSON~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
* instantiated in apps.
|
||||
* Base class for feature formats.
|
||||
* {ol.format.Feature} subclasses provide the ability to decode and encode
|
||||
* {module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode
|
||||
* {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial
|
||||
* file formats. See the documentation for each format for more details.
|
||||
*
|
||||
@@ -125,7 +125,7 @@ FeatureFormat.prototype.getLastExtent = function() {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @return {ol.format.FormatType} Format.
|
||||
* @return {module:ol/format/FormatType~FormatType} Format.
|
||||
*/
|
||||
FeatureFormat.prototype.getType = function() {};
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ export const GMLNS = 'http://www.opengis.net/gml';
|
||||
* @abstract
|
||||
* @param {module:ol/format/GMLBase~Options=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.format.XMLFeature}
|
||||
* @extends {module:ol/format/XMLFeature~XMLFeature}
|
||||
*/
|
||||
const GMLBase = function(opt_options) {
|
||||
const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {});
|
||||
|
||||
@@ -39,7 +39,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
|
||||
* Feature format for reading and writing data in the GPX format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.XMLFeature}
|
||||
* @extends {module:ol/format/XMLFeature~XMLFeature}
|
||||
* @param {module:ol/format/GPX~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -38,7 +38,7 @@ import {get as getProjection} from '../proj.js';
|
||||
* Feature format for reading and writing data in the GeoJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.JSONFeature}
|
||||
* @extends {module:ol/format/JSONFeature~JSONFeature}
|
||||
* @param {module:ol/format/GeoJSON~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@ const IGCZ = {
|
||||
* Feature format for `*.igc` flight recording files.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.TextFeature}
|
||||
* @extends {module:ol/format/TextFeature~TextFeature}
|
||||
* @param {module:ol/format/IGC~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.format.Feature}
|
||||
* @extends {module:ol/format/Feature~FeatureFormat}
|
||||
*/
|
||||
const JSONFeature = function() {
|
||||
FeatureFormat.call(this);
|
||||
|
||||
@@ -260,7 +260,7 @@ function createStyleDefaults() {
|
||||
* which do not support this will need a URL polyfill to be loaded before use.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.XMLFeature}
|
||||
* @extends {module:ol/format/XMLFeature~XMLFeature}
|
||||
* @param {module:ol/format/KML~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
@@ -2217,7 +2217,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @this {ol.format.KML}
|
||||
* @this {module:ol/format/KML~KML}
|
||||
*/
|
||||
function writeDocument(node, features, objectStack) {
|
||||
const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node};
|
||||
@@ -2670,7 +2670,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
|
||||
* @param {Node} node Node.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @this {ol.format.KML}
|
||||
* @this {module:ol/format/KML~KML}
|
||||
*/
|
||||
function writePlacemark(node, feature, objectStack) {
|
||||
const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node};
|
||||
|
||||
@@ -43,7 +43,7 @@ import RenderFeature from '../render/Feature.js';
|
||||
* Feature format for reading data in the Mapbox MVT format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.Feature}
|
||||
* @extends {module:ol/format/Feature~FeatureFormat}
|
||||
* @param {module:ol/format/MVT~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ import {pushParseAndPop, makeStructureNS} from '../xml.js';
|
||||
* [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.XMLFeature}
|
||||
* @extends {module:ol/format/XMLFeature~XMLFeature}
|
||||
* @api
|
||||
*/
|
||||
const OSMXML = function() {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pus
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.format.XML}
|
||||
* @extends {module:ol/format/XML~XML}
|
||||
*/
|
||||
const OWS = function() {
|
||||
XML.call(this);
|
||||
|
||||
@@ -28,7 +28,7 @@ import {get as getProjection} from '../proj.js';
|
||||
* Polyline Algorithm Format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.TextFeature}
|
||||
* @extends {module:ol/format/TextFeature~TextFeature}
|
||||
* @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.format.Feature}
|
||||
* @extends {module:ol/format/Feature~FeatureFormat}
|
||||
*/
|
||||
const TextFeature = function() {
|
||||
FeatureFormat.call(this);
|
||||
|
||||
@@ -44,7 +44,7 @@ import {get as getProjection} from '../proj.js';
|
||||
* Feature format for reading data in the TopoJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.JSONFeature}
|
||||
* @extends {module:ol/format/JSONFeature~JSONFeature}
|
||||
* @param {module:ol/format/TopoJSON~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -128,7 +128,7 @@ const DEFAULT_VERSION = '1.1.0';
|
||||
*
|
||||
* @constructor
|
||||
* @param {module:ol/format/WFS~Options=} opt_options Optional configuration object.
|
||||
* @extends {ol.format.XMLFeature}
|
||||
* @extends {module:ol/format/XMLFeature~XMLFeature}
|
||||
* @api
|
||||
*/
|
||||
const WFS = function(opt_options) {
|
||||
|
||||
@@ -538,7 +538,7 @@ Parser.prototype.formatErrorMessage_ = function() {
|
||||
* format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.TextFeature}
|
||||
* @extends {module:ol/format/TextFeature~TextFeature}
|
||||
* @param {module:ol/format/WKT~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -14,7 +14,7 @@ import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,
|
||||
* Format for reading WMS capabilities data
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.XML}
|
||||
* @extends {module:ol/format/XML~XML}
|
||||
* @api
|
||||
*/
|
||||
const WMSCapabilities = function() {
|
||||
|
||||
@@ -22,7 +22,7 @@ import {makeArrayPusher, makeStructureNS, pushParseAndPop} from '../xml.js';
|
||||
* {@link ol.format.GML2} to read features.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.XMLFeature}
|
||||
* @extends {module:ol/format/XMLFeature~XMLFeature}
|
||||
* @param {module:ol/format/WMSGetFeatureInfo~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ import {pushParseAndPop, makeStructureNS,
|
||||
* Format for reading WMTS capabilities data.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.format.XML}
|
||||
* @extends {module:ol/format/XML~XML}
|
||||
* @api
|
||||
*/
|
||||
const WMTSCapabilities = function() {
|
||||
|
||||
@@ -15,7 +15,7 @@ import {isDocument, isNode, parse} from '../xml.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.format.Feature}
|
||||
* @extends {module:ol/format/Feature~FeatureFormat}
|
||||
*/
|
||||
const XMLFeature = function() {
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {get as getProjection} from '../proj.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {Array.<function(new: ol.format.Feature)>} [formatConstructors] Format constructors.
|
||||
* @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
|
||||
* 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
|
||||
@@ -100,7 +100,7 @@ const DragAndDrop = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<function(new: ol.format.Feature)>}
|
||||
* @type {Array.<function(new: module:ol/format/Feature~FeatureFormat)>}
|
||||
*/
|
||||
this.formatConstructors_ = options.formatConstructors ?
|
||||
options.formatConstructors : [];
|
||||
@@ -183,7 +183,7 @@ DragAndDrop.prototype.handleResult_ = function(file, event) {
|
||||
*/
|
||||
const formatConstructor = formatConstructors[i];
|
||||
/**
|
||||
* @type {ol.format.Feature}
|
||||
* @type {module:ol/format/Feature~FeatureFormat}
|
||||
*/
|
||||
const format = new formatConstructor();
|
||||
features = this.tryReadFeatures_(format, result, {
|
||||
@@ -247,7 +247,7 @@ DragAndDrop.prototype.setMap = function(map) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.format.Feature} format Format.
|
||||
* @param {module:ol/format/Feature~FeatureFormat} format Format.
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions} options Read options.
|
||||
* @private
|
||||
|
||||
@@ -27,7 +27,7 @@ import {assign} from '../obj.js';
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
* instantiated in apps.
|
||||
* Note that with `ol.layer.Base` and all its subclasses, any property set in
|
||||
* Note that with `module:ol/layer/Base~BaseLayer` and all its subclasses, any property set in
|
||||
* the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so
|
||||
* is observable, and has get/set accessors.
|
||||
*
|
||||
@@ -63,7 +63,7 @@ const BaseLayer = function(options) {
|
||||
* @private
|
||||
*/
|
||||
this.state_ = /** @type {module:ol/layer/Layer~State} */ ({
|
||||
layer: /** @type {ol.layer.Layer} */ (this),
|
||||
layer: /** @type {module:ol/layer/Layer~Layer} */ (this),
|
||||
managed: true
|
||||
});
|
||||
|
||||
@@ -106,9 +106,9 @@ BaseLayer.prototype.getLayerState = function() {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Array.<ol.layer.Layer>=} opt_array Array of layers (to be
|
||||
* @param {Array.<module:ol/layer/Layer~Layer>=} opt_array Array of layers (to be
|
||||
* modified in place).
|
||||
* @return {Array.<ol.layer.Layer>} Array of layers.
|
||||
* @return {Array.<module:ol/layer/Layer~Layer>} Array of layers.
|
||||
*/
|
||||
BaseLayer.prototype.getLayersArray = function(opt_array) {};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ const Property = {
|
||||
* A generic `change` event is triggered when the group/Collection changes.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.layer.Base}
|
||||
* @extends {module:ol/layer/Base~BaseLayer}
|
||||
* @param {olx.layer.GroupOptions=} opt_options Layer options.
|
||||
* @api
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ LayerGroup.prototype.handleLayersChanged_ = function(event) {
|
||||
* @private
|
||||
*/
|
||||
LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
||||
const layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
|
||||
const layer = /** @type {module:ol/layer/Base~BaseLayer} */ (collectionEvent.element);
|
||||
const key = getUid(layer).toString();
|
||||
this.listenerKeys_[key] = [
|
||||
listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),
|
||||
@@ -140,7 +140,7 @@ LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
||||
* @private
|
||||
*/
|
||||
LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
||||
const layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
|
||||
const layer = /** @type {module:ol/layer/Base~BaseLayer} */ (collectionEvent.element);
|
||||
const key = getUid(layer).toString();
|
||||
this.listenerKeys_[key].forEach(unlistenByKey);
|
||||
delete this.listenerKeys_[key];
|
||||
@@ -149,23 +149,23 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers}
|
||||
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
||||
* in this group.
|
||||
* @return {!module:ol/Collection~Collection.<ol.layer.Base>} Collection of
|
||||
* {@link ol.layer.Base layers} that are part of this group.
|
||||
* @return {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} Collection of
|
||||
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
LayerGroup.prototype.getLayers = function() {
|
||||
return /** @type {!module:ol/Collection~Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
|
||||
return /** @type {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} */ (this.get(Property.LAYERS));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Set the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers}
|
||||
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
||||
* in this group.
|
||||
* @param {!module:ol/Collection~Collection.<ol.layer.Base>} layers Collection of
|
||||
* {@link ol.layer.Base layers} that are part of this group.
|
||||
* @param {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} layers Collection of
|
||||
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
||||
* @observable
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -39,7 +39,7 @@ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
||||
* options means that `title` is observable, and has get/set accessors.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.layer.Vector}
|
||||
* @extends {module:ol/layer/Vector~VectorLayer}
|
||||
* @fires ol.render.Event
|
||||
* @param {olx.layer.HeatmapOptions=} opt_options Options.
|
||||
* @api
|
||||
|
||||
@@ -14,7 +14,7 @@ import Layer from '../layer/Layer.js';
|
||||
* options means that `title` is observable, and has get/set accessors.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.layer.Layer}
|
||||
* @extends {module:ol/layer/Layer~Layer}
|
||||
* @fires ol.render.Event
|
||||
* @param {olx.layer.ImageOptions=} opt_options Layer options.
|
||||
* @api
|
||||
|
||||
@@ -37,13 +37,13 @@ import SourceState from '../source/State.js';
|
||||
* Layers are usually added to a map with {@link ol.Map#addLayer}. Components
|
||||
* like {@link module:ol/interaction/Select~Select} use unmanaged layers
|
||||
* internally. These unmanaged layers are associated with the map using
|
||||
* {@link ol.layer.Layer#setMap} instead.
|
||||
* {@link module:ol/layer/Layer~Layer#setMap} instead.
|
||||
*
|
||||
* A generic `change` event is fired when the state of the source changes.
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.layer.Base}
|
||||
* @extends {module:ol/layer/Base~BaseLayer}
|
||||
* @fires ol.render.Event
|
||||
* @param {olx.layer.LayerOptions} options Layer options.
|
||||
* @api
|
||||
|
||||
@@ -16,7 +16,7 @@ import {assign} from '../obj.js';
|
||||
* options means that `title` is observable, and has get/set accessors.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.layer.Layer}
|
||||
* @extends {module:ol/layer/Layer~Layer}
|
||||
* @fires ol.render.Event
|
||||
* @param {olx.layer.TileOptions=} opt_options Tile layer options.
|
||||
* @api
|
||||
|
||||
@@ -26,7 +26,7 @@ const Property = {
|
||||
* options means that `title` is observable, and has get/set accessors.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.layer.Layer}
|
||||
* @extends {module:ol/layer/Layer~Layer}
|
||||
* @fires ol.render.Event
|
||||
* @param {olx.layer.VectorOptions=} opt_options Options.
|
||||
* @api
|
||||
@@ -88,7 +88,7 @@ const VectorLayer = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.layer.VectorTileRenderType|string}
|
||||
* @type {module:ol/layer/VectorTileRenderType~VectorTileRenderType|string}
|
||||
*/
|
||||
this.renderMode_ = options.renderMode || VectorRenderType.VECTOR;
|
||||
|
||||
@@ -215,7 +215,7 @@ VectorLayer.prototype.setStyle = function(style) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.layer.VectorRenderType|string} The render mode.
|
||||
* @return {module:ol/layer/VectorRenderType~VectorRenderType|string} The render mode.
|
||||
*/
|
||||
VectorLayer.prototype.getRenderMode = function() {
|
||||
return this.renderMode_;
|
||||
|
||||
@@ -17,7 +17,7 @@ import {assign} from '../obj.js';
|
||||
* options means that `title` is observable, and has get/set accessors.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.layer.Vector}
|
||||
* @extends {module:ol/layer/Vector~VectorLayer}
|
||||
* @param {olx.layer.VectorTileOptions=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -490,7 +490,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
|
||||
* Render a feature into the canvas. Note that any `zIndex` on the provided
|
||||
* style will be ignored - features are rendered immediately in the order that
|
||||
* this method is called. If you need `zIndex` support, you should be using an
|
||||
* {@link ol.layer.Vector} instead.
|
||||
* {@link module:ol/layer/Vector~VectorLayer} instead.
|
||||
*
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
|
||||
@@ -13,7 +13,7 @@ import SourceState from '../source/State.js';
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {module:ol/Observable~Observable}
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
* @struct
|
||||
*/
|
||||
const LayerRenderer = function(layer) {
|
||||
@@ -22,7 +22,7 @@ const LayerRenderer = function(layer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.layer.Layer}
|
||||
* @type {module:ol/layer/Layer~Layer}
|
||||
*/
|
||||
this.layer_ = layer;
|
||||
|
||||
@@ -36,7 +36,7 @@ inherits(LayerRenderer, Observable);
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), ol.layer.Layer): T}
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), module:ol/layer/Layer~Layer): T}
|
||||
* callback Feature callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -82,7 +82,7 @@ LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, ti
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.layer.Layer} Layer.
|
||||
* @return {module:ol/layer/Layer~Layer} Layer.
|
||||
*/
|
||||
LayerRenderer.prototype.getLayer = function() {
|
||||
return this.layer_;
|
||||
|
||||
@@ -91,9 +91,9 @@ function expireIconCache(map, frameState) {
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState FrameState.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature),
|
||||
* ol.layer.Layer): T} callback Feature callback.
|
||||
* module:ol/layer/Layer~Layer): T} callback Feature callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
|
||||
* @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
|
||||
* function, only layers which are visible and for which this function
|
||||
* returns `true` will be tested for features. By default, all visible
|
||||
* layers will be tested.
|
||||
@@ -109,7 +109,7 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function forEachFeatureAtCoordinate(feature, layer) {
|
||||
@@ -159,10 +159,10 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
|
||||
* @abstract
|
||||
* @param {module:ol~Pixel} pixel Pixel.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState FrameState.
|
||||
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
|
||||
* @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
|
||||
* function, only layers which are visible and for which this function
|
||||
* returns `true` will be tested for features. By default, all visible
|
||||
* layers will be tested.
|
||||
@@ -178,7 +178,7 @@ MapRenderer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState FrameState.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
|
||||
* @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
|
||||
* function, only layers which are visible and for which this function
|
||||
* returns `true` will be tested for features. By default, all visible
|
||||
* layers will be tested.
|
||||
@@ -195,7 +195,7 @@ MapRenderer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState,
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
* @protected
|
||||
* @return {ol.renderer.Layer} Layer renderer.
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.canvas.IntermediateCanvas}
|
||||
* @param {ol.layer.Image} imageLayer Single image layer.
|
||||
* @param {module:ol/layer/Image~ImageLayer} imageLayer Single image layer.
|
||||
* @api
|
||||
*/
|
||||
const CanvasImageLayerRenderer = function(imageLayer) {
|
||||
@@ -56,24 +56,24 @@ inherits(CanvasImageLayerRenderer, IntermediateCanvasRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
CanvasImageLayerRenderer['handles'] = function(type, layer) {
|
||||
return type === RendererType.CANVAS && (layer.getType() === LayerType.IMAGE ||
|
||||
layer.getType() === LayerType.VECTOR &&
|
||||
/** @type {ol.layer.Vector} */ (layer).getRenderMode() === VectorRenderType.IMAGE);
|
||||
/** @type {module:ol/layer/Vector~VectorLayer} */ (layer).getRenderMode() === VectorRenderType.IMAGE);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.canvas.ImageLayer} The layer renderer.
|
||||
*/
|
||||
CanvasImageLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
const renderer = new CanvasImageLayerRenderer(/** @type {ol.layer.Image} */ (layer));
|
||||
const renderer = new CanvasImageLayerRenderer(/** @type {module:ol/layer/Image~ImageLayer} */ (layer));
|
||||
if (layer.getType() === LayerType.VECTOR) {
|
||||
const candidates = getLayerRendererPlugins();
|
||||
for (let i = 0, ii = candidates.length; i < ii; ++i) {
|
||||
@@ -127,7 +127,7 @@ CanvasImageLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
|
||||
const viewResolution = viewState.resolution;
|
||||
|
||||
let image;
|
||||
const imageLayer = /** @type {ol.layer.Image} */ (this.getLayer());
|
||||
const imageLayer = /** @type {module:ol/layer/Image~ImageLayer} */ (this.getLayer());
|
||||
const imageSource = imageLayer.getSource();
|
||||
|
||||
const hints = frameState.viewHints;
|
||||
|
||||
@@ -13,7 +13,7 @@ import {create as createTransform, apply as applyTransform} from '../../transfor
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.renderer.canvas.Layer}
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
*/
|
||||
const IntermediateCanvasRenderer = function(layer) {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {create as createTransform, apply as applyTransform, compose as composeTr
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.renderer.Layer}
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
*/
|
||||
const CanvasLayerRenderer = function(layer) {
|
||||
|
||||
@@ -101,7 +101,7 @@ CanvasLayerRenderer.prototype.dispatchComposeEvent_ = function(type, context, fr
|
||||
/**
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState FrameState.
|
||||
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @return {T|undefined} Callback result.
|
||||
|
||||
@@ -15,7 +15,7 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.canvas.IntermediateCanvas}
|
||||
* @param {ol.layer.Tile|ol.layer.VectorTile} tileLayer Tile layer.
|
||||
* @param {module:ol/layer/Tile~TileLayer|module:ol/layer/VectorTile~VectorTile} tileLayer Tile layer.
|
||||
* @api
|
||||
*/
|
||||
const CanvasTileLayerRenderer = function(tileLayer) {
|
||||
@@ -84,7 +84,7 @@ inherits(CanvasTileLayerRenderer, IntermediateCanvasRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
CanvasTileLayerRenderer['handles'] = function(type, layer) {
|
||||
@@ -95,11 +95,11 @@ CanvasTileLayerRenderer['handles'] = function(type, layer) {
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.canvas.TileLayer} The layer renderer.
|
||||
*/
|
||||
CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
return new CanvasTileLayerRenderer(/** @type {ol.layer.Tile} */ (layer));
|
||||
return new CanvasTileLayerRenderer(/** @type {module:ol/layer/Tile~TileLayer} */ (layer));
|
||||
};
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ CanvasTileLayerRenderer.prototype.getImage = function() {
|
||||
|
||||
/**
|
||||
* @function
|
||||
* @return {ol.layer.Tile|ol.layer.VectorTile}
|
||||
* @return {module:ol/layer/Tile~TileLayer|module:ol/layer/VectorTile~VectorTile}
|
||||
*/
|
||||
CanvasTileLayerRenderer.prototype.getLayer;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance,
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.canvas.Layer}
|
||||
* @param {ol.layer.Vector} vectorLayer Vector layer.
|
||||
* @param {module:ol/layer/Vector~VectorLayer} vectorLayer Vector layer.
|
||||
* @api
|
||||
*/
|
||||
const CanvasVectorLayerRenderer = function(vectorLayer) {
|
||||
@@ -89,7 +89,7 @@ inherits(CanvasVectorLayerRenderer, CanvasLayerRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
CanvasVectorLayerRenderer['handles'] = function(type, layer) {
|
||||
@@ -100,11 +100,11 @@ CanvasVectorLayerRenderer['handles'] = function(type, layer) {
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.canvas.VectorLayer} The layer renderer.
|
||||
*/
|
||||
CanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
return new CanvasVectorLayerRenderer(/** @type {ol.layer.Vector} */ (layer));
|
||||
return new CanvasVectorLayerRenderer(/** @type {module:ol/layer/Vector~VectorLayer} */ (layer));
|
||||
};
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ CanvasVectorLayerRenderer.prototype.composeFrame = function(frameState, layerSta
|
||||
if (this.declutterTree_) {
|
||||
this.declutterTree_.clear();
|
||||
}
|
||||
const layer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
const layer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
|
||||
let drawOffsetX = 0;
|
||||
let drawOffsetY = 0;
|
||||
let replayContext;
|
||||
@@ -252,7 +252,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
|
||||
} else {
|
||||
const resolution = frameState.viewState.resolution;
|
||||
const rotation = frameState.viewState.rotation;
|
||||
const layer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
const layer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
|
||||
/** @type {!Object.<string, boolean>} */
|
||||
const features = {};
|
||||
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
@@ -297,7 +297,7 @@ CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
||||
* @inheritDoc
|
||||
*/
|
||||
CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerState) {
|
||||
const vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
const vectorLayer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
|
||||
const vectorSource = vectorLayer.getSource();
|
||||
|
||||
const animating = frameState.viewHints[ViewHint.ANIMATING];
|
||||
|
||||
@@ -51,7 +51,7 @@ const VECTOR_REPLAYS = {
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.renderer.canvas.TileLayer}
|
||||
* @param {ol.layer.VectorTile} layer VectorTile layer.
|
||||
* @param {module:ol/layer/VectorTile~VectorTile} layer VectorTile layer.
|
||||
* @api
|
||||
*/
|
||||
const CanvasVectorTileLayerRenderer = function(layer) {
|
||||
@@ -100,7 +100,7 @@ inherits(CanvasVectorTileLayerRenderer, CanvasTileLayerRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
CanvasVectorTileLayerRenderer['handles'] = function(type, layer) {
|
||||
@@ -111,11 +111,11 @@ CanvasVectorTileLayerRenderer['handles'] = function(type, layer) {
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.canvas.VectorTileLayer} The layer renderer.
|
||||
*/
|
||||
CanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
return new CanvasVectorTileLayerRenderer(/** @type {ol.layer.VectorTile} */ (layer));
|
||||
return new CanvasVectorTileLayerRenderer(/** @type {module:ol/layer/VectorTile~VectorTile} */ (layer));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import {createTexture} from '../../webgl/Context.js';
|
||||
* @constructor
|
||||
* @extends {ol.renderer.webgl.Layer}
|
||||
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
|
||||
* @param {ol.layer.Image} imageLayer Tile layer.
|
||||
* @param {module:ol/layer/Image~ImageLayer} imageLayer Tile layer.
|
||||
* @api
|
||||
*/
|
||||
const WebGLImageLayerRenderer = function(mapRenderer, imageLayer) {
|
||||
@@ -62,7 +62,7 @@ inherits(WebGLImageLayerRenderer, WebGLLayerRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
WebGLImageLayerRenderer['handles'] = function(type, layer) {
|
||||
@@ -73,13 +73,13 @@ WebGLImageLayerRenderer['handles'] = function(type, layer) {
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.webgl.ImageLayer} The layer renderer.
|
||||
*/
|
||||
WebGLImageLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
return new WebGLImageLayerRenderer(
|
||||
/** @type {ol.renderer.webgl.Map} */ (mapRenderer),
|
||||
/** @type {ol.layer.Image} */ (layer)
|
||||
/** @type {module:ol/layer/Image~ImageLayer} */ (layer)
|
||||
);
|
||||
};
|
||||
|
||||
@@ -140,7 +140,7 @@ WebGLImageLayerRenderer.prototype.prepareFrame = function(frameState, layerState
|
||||
|
||||
let image = this.image_;
|
||||
let texture = this.texture;
|
||||
const imageLayer = /** @type {ol.layer.Image} */ (this.getLayer());
|
||||
const imageLayer = /** @type {module:ol/layer/Image~ImageLayer} */ (this.getLayer());
|
||||
const imageSource = imageLayer.getSource();
|
||||
|
||||
const hints = frameState.viewHints;
|
||||
|
||||
@@ -20,7 +20,7 @@ import {createEmptyTexture} from '../../webgl/Context.js';
|
||||
* @abstract
|
||||
* @extends {ol.renderer.Layer}
|
||||
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
*/
|
||||
const WebGLLayerRenderer = function(mapRenderer, layer) {
|
||||
|
||||
@@ -255,7 +255,7 @@ WebGLLayerRenderer.prototype.prepareFrame = function(frameState, layerState, con
|
||||
* @abstract
|
||||
* @param {module:ol~Pixel} pixel Pixel.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState FrameState.
|
||||
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @return {T|undefined} Callback result.
|
||||
|
||||
@@ -30,7 +30,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
||||
* @constructor
|
||||
* @extends {ol.renderer.webgl.Layer}
|
||||
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
|
||||
* @param {ol.layer.Tile} tileLayer Tile layer.
|
||||
* @param {module:ol/layer/Tile~TileLayer} tileLayer Tile layer.
|
||||
* @api
|
||||
*/
|
||||
const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) {
|
||||
@@ -98,7 +98,7 @@ inherits(WebGLTileLayerRenderer, WebGLLayerRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
WebGLTileLayerRenderer['handles'] = function(type, layer) {
|
||||
@@ -109,13 +109,13 @@ WebGLTileLayerRenderer['handles'] = function(type, layer) {
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.webgl.TileLayer} The layer renderer.
|
||||
*/
|
||||
WebGLTileLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
return new WebGLTileLayerRenderer(
|
||||
/** @type {ol.renderer.webgl.Map} */ (mapRenderer),
|
||||
/** @type {ol.layer.Tile} */ (layer)
|
||||
/** @type {module:ol/layer/Tile~TileLayer} */ (layer)
|
||||
);
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
|
||||
const viewState = frameState.viewState;
|
||||
const projection = viewState.projection;
|
||||
|
||||
const tileLayer = /** @type {ol.layer.Tile} */ (this.getLayer());
|
||||
const tileLayer = /** @type {module:ol/layer/Tile~TileLayer} */ (this.getLayer());
|
||||
const tileSource = tileLayer.getSource();
|
||||
const tileGrid = tileSource.getTileGridForProjection(projection);
|
||||
const z = tileGrid.getZForResolution(viewState.resolution);
|
||||
|
||||
@@ -15,7 +15,7 @@ import {apply as applyTransform} from '../../transform.js';
|
||||
* @constructor
|
||||
* @extends {ol.renderer.webgl.Layer}
|
||||
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
|
||||
* @param {ol.layer.Vector} vectorLayer Vector layer.
|
||||
* @param {module:ol/layer/Vector~VectorLayer} vectorLayer Vector layer.
|
||||
* @api
|
||||
*/
|
||||
const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
|
||||
@@ -73,7 +73,7 @@ inherits(WebGLVectorLayerRenderer, WebGLLayerRenderer);
|
||||
/**
|
||||
* Determine if this renderer handles the provided layer.
|
||||
* @param {ol.renderer.Type} type The renderer type.
|
||||
* @param {ol.layer.Layer} layer The candidate layer.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The candidate layer.
|
||||
* @return {boolean} The renderer can render the layer.
|
||||
*/
|
||||
WebGLVectorLayerRenderer['handles'] = function(type, layer) {
|
||||
@@ -84,13 +84,13 @@ WebGLVectorLayerRenderer['handles'] = function(type, layer) {
|
||||
/**
|
||||
* Create a layer renderer.
|
||||
* @param {ol.renderer.Map} mapRenderer The map renderer.
|
||||
* @param {ol.layer.Layer} layer The layer to be rendererd.
|
||||
* @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
|
||||
* @return {ol.renderer.webgl.VectorLayer} The layer renderer.
|
||||
*/
|
||||
WebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
return new WebGLVectorLayerRenderer(
|
||||
/** @type {ol.renderer.webgl.Map} */ (mapRenderer),
|
||||
/** @type {ol.layer.Vector} */ (layer)
|
||||
/** @type {module:ol/layer/Vector~VectorLayer} */ (layer)
|
||||
);
|
||||
};
|
||||
|
||||
@@ -212,7 +212,7 @@ WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
||||
* @inheritDoc
|
||||
*/
|
||||
WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerState, context) {
|
||||
const vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
const vectorLayer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
|
||||
const vectorSource = vectorLayer.getSource();
|
||||
|
||||
const animating = frameState.viewHints[ViewHint.ANIMATING];
|
||||
|
||||
@@ -12,7 +12,7 @@ import SourceState from '../source/State.js';
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
* instantiated in apps.
|
||||
* Base class for {@link ol.layer.Layer} sources.
|
||||
* Base class for {@link module:ol/layer/Layer~Layer} sources.
|
||||
*
|
||||
* A generic `change` event is triggered when the state of the source changes.
|
||||
*
|
||||
|
||||
@@ -79,7 +79,7 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.format.Feature|undefined}
|
||||
* @type {module:ol/format/Feature~FeatureFormat|undefined}
|
||||
*/
|
||||
this.format_ = options.format;
|
||||
|
||||
@@ -100,7 +100,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 {ol.format.Feature} */ (this.format_));
|
||||
this.loader_ = xhr(this.url_, /** @type {module:ol/format/Feature~FeatureFormat} */ (this.format_));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -656,7 +656,7 @@ VectorSource.prototype.getFeatureById = function(id) {
|
||||
/**
|
||||
* Get the format associated with this source.
|
||||
*
|
||||
* @return {ol.format.Feature|undefined} The feature format.
|
||||
* @return {module:ol/format/Feature~FeatureFormat|undefined} The feature format.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFormat = function() {
|
||||
|
||||
@@ -13,7 +13,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
/**
|
||||
* @classdesc
|
||||
* Class for layer sources providing vector data divided into a tile grid, to be
|
||||
* used with {@link ol.layer.VectorTile}. Although this source receives tiles
|
||||
* used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles
|
||||
* 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
|
||||
@@ -56,7 +56,7 @@ const VectorTileSource = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.format.Feature}
|
||||
* @type {module:ol/format/Feature~FeatureFormat}
|
||||
*/
|
||||
this.format_ = options.format ? options.format : null;
|
||||
|
||||
@@ -75,7 +75,7 @@ const VectorTileSource = function(options) {
|
||||
/**
|
||||
* @protected
|
||||
* @type {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
|
||||
* ol.format.Feature, module:ol/Tile~LoadFunction)}
|
||||
* module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)}
|
||||
*/
|
||||
this.tileClass = options.tileClass ? options.tileClass : VectorTile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user