Module type for ol/Feature
This commit is contained in:
@@ -70,7 +70,7 @@ const style = new Style({
|
||||
* The styling function for the vector layer, will return an array of styles
|
||||
* which either contains the aboove gradient or pattern.
|
||||
*
|
||||
* @param {ol.Feature} feature The feature to style.
|
||||
* @param {module:ol/Feature~Feature} feature The feature to style.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {ol.style.Style} The style to use for the feature.
|
||||
*/
|
||||
|
||||
@@ -49,7 +49,7 @@ app.Drag = function() {
|
||||
this.cursor_ = 'pointer';
|
||||
|
||||
/**
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.feature_ = null;
|
||||
|
||||
@@ -44,7 +44,7 @@ const vector = new VectorLayer({
|
||||
|
||||
/**
|
||||
* Currently drawn feature.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
*/
|
||||
let sketch;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ common.getRendererFromQueryString = function(opt_default) {};
|
||||
* @param {function(new:ol.style.Stroke, olx.style.StrokeOptions=)} Stroke Stroke constructor.
|
||||
* @param {function(new:ol.style.Icon, olx.style.IconOptions=)} Icon Icon constructor.
|
||||
* @param {function(new:ol.style.Text, olx.style.TextOptions=)} Text Text constructor.
|
||||
* @return {function((ol.Feature|ol.render.Feature), number):
|
||||
* @return {function((module:ol/Feature~Feature|ol.render.Feature), number):
|
||||
* Array.<ol.style.Style>}
|
||||
*/
|
||||
var createMapboxStreetsV6Style = function(Style, Fill, Stroke, Icon, Text) {};
|
||||
|
||||
@@ -86,7 +86,7 @@ oli.DrawEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
*/
|
||||
oli.DrawEvent.prototype.feature;
|
||||
|
||||
@@ -109,7 +109,7 @@ oli.ModifyEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
oli.ModifyEvent.prototype.features;
|
||||
|
||||
@@ -199,13 +199,13 @@ oli.SelectEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
oli.SelectEvent.prototype.deselected;
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
oli.SelectEvent.prototype.selected;
|
||||
|
||||
@@ -248,7 +248,7 @@ oli.interaction.DragAndDropEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {Array.<ol.Feature>|undefined}
|
||||
* @type {Array.<module:ol/Feature~Feature>|undefined}
|
||||
*/
|
||||
oli.interaction.DragAndDropEvent.prototype.features;
|
||||
|
||||
@@ -272,7 +272,7 @@ oli.interaction.TranslateEvent = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
oli.interaction.TranslateEvent.prototype.features;
|
||||
|
||||
@@ -380,6 +380,6 @@ oli.source.Vector.Event = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Feature|undefined}
|
||||
* @type {module:ol/Feature~Feature|undefined}
|
||||
*/
|
||||
oli.source.Vector.Event.prototype.feature;
|
||||
|
||||
@@ -239,7 +239,7 @@ olx.interaction.DragZoomOptions.prototype.out;
|
||||
|
||||
/**
|
||||
* @typedef {{clickTolerance: (number|undefined),
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* dragVertexDelay: (number|undefined),
|
||||
* snapTolerance: (number|undefined),
|
||||
@@ -273,7 +273,7 @@ olx.interaction.DrawOptions.prototype.clickTolerance;
|
||||
|
||||
/**
|
||||
* Destination collection for the drawn features.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.DrawOptions.prototype.features;
|
||||
@@ -465,7 +465,7 @@ olx.interaction.ExtentOptions.prototype.wrapX;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* layers: (undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean),
|
||||
* hitTolerance: (number|undefined)
|
||||
* }}
|
||||
@@ -476,7 +476,7 @@ olx.interaction.TranslateOptions;
|
||||
/**
|
||||
* Only features contained in this collection will be able to be translated. If
|
||||
* not specified, all features on the map will be able to be translated.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.TranslateOptions.prototype.features;
|
||||
@@ -581,7 +581,7 @@ olx.interaction.KeyboardZoomOptions.prototype.delta;
|
||||
* pixelTolerance: (number|undefined),
|
||||
* style: (ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* wrapX: (boolean|undefined)
|
||||
* }}
|
||||
*/
|
||||
@@ -650,7 +650,7 @@ olx.interaction.ModifyOptions.prototype.source;
|
||||
/**
|
||||
* The features the interaction works on. If a feature collection is not
|
||||
* provided, a vector source must be provided with the source option.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.ModifyOptions.prototype.features;
|
||||
@@ -832,7 +832,7 @@ olx.interaction.PointerOptions.prototype.handleUpEvent;
|
||||
* removeCondition: (ol.EventsConditionType|undefined),
|
||||
* toggleCondition: (ol.EventsConditionType|undefined),
|
||||
* multi: (boolean|undefined),
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* filter: (ol.SelectFilterFunction|undefined),
|
||||
* wrapX: (boolean|undefined),
|
||||
* hitTolerance: (number|undefined)}}
|
||||
@@ -927,13 +927,13 @@ olx.interaction.SelectOptions.prototype.multi;
|
||||
* not set the interaction will create a collection. In any case the collection
|
||||
* used by the interaction is returned by
|
||||
* {@link ol.interaction.Select#getFeatures}.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.SelectOptions.prototype.features;
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and
|
||||
* A function that takes an {@link module:ol/Feature~Feature} and an {@link ol.layer.Layer} and
|
||||
* returns `true` if the feature may be selected or `false` otherwise.
|
||||
* @type {ol.SelectFilterFunction|undefined}
|
||||
* @api
|
||||
@@ -962,7 +962,7 @@ olx.interaction.SelectOptions.prototype.hitTolerance;
|
||||
/**
|
||||
* Options for snap
|
||||
* @typedef {{
|
||||
* features: (ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* pixelTolerance: (number|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* edge: (boolean|undefined),
|
||||
@@ -974,7 +974,7 @@ olx.interaction.SnapOptions;
|
||||
|
||||
/**
|
||||
* Snap to these features. Either this option or source should be provided.
|
||||
* @type {ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.interaction.SnapOptions.prototype.features;
|
||||
@@ -1220,7 +1220,7 @@ olx.layer.GroupOptions.prototype.layers;
|
||||
* radius: (number|undefined),
|
||||
* blur: (number|undefined),
|
||||
* shadow: (number|undefined),
|
||||
* weight: (string|function(ol.Feature):number|undefined),
|
||||
* weight: (string|function(module:ol/Feature~Feature):number|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* minResolution: (number|undefined),
|
||||
* maxResolution: (number|undefined),
|
||||
@@ -1269,7 +1269,7 @@ olx.layer.HeatmapOptions.prototype.shadow;
|
||||
* 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). Default is `weight`.
|
||||
* @type {string|function(ol.Feature):number|undefined}
|
||||
* @type {string|function(module:ol/Feature~Feature):number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.weight;
|
||||
@@ -1867,7 +1867,7 @@ olx.layer.VectorTileOptions.prototype.zIndex;
|
||||
|
||||
/**
|
||||
* @typedef {{context: CanvasRenderingContext2D,
|
||||
* feature: (ol.Feature|ol.render.Feature),
|
||||
* feature: (module:ol/Feature~Feature|ol.render.Feature),
|
||||
* geometry: module:ol/geom/SimpleGeometry~SimpleGeometry,
|
||||
* pixelRatio: number,
|
||||
* resolution: number,
|
||||
@@ -2017,7 +2017,7 @@ olx.source.BingMapsOptions.prototype.transition;
|
||||
* distance: (number|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* format: (ol.format.Feature|undefined),
|
||||
* geometryFunction: (undefined|function(ol.Feature):module:ol/geom/Point~Point),
|
||||
* geometryFunction: (undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point),
|
||||
* projection: ol.ProjectionLike,
|
||||
* source: ol.source.Vector,
|
||||
* wrapX: (boolean|undefined)}}
|
||||
@@ -2050,7 +2050,7 @@ olx.source.ClusterOptions.prototype.extent;
|
||||
|
||||
|
||||
/**
|
||||
* Function that takes an {@link ol.Feature} as argument and returns an
|
||||
* Function that takes an {@link module:ol/Feature~Feature} as argument and returns an
|
||||
* {@link module:ol/geom/Point~Point} as cluster calculation point for the feature. When a
|
||||
* feature should not be considered for clustering, the function should return
|
||||
* `null`. The default, which works when the underyling source contains point
|
||||
@@ -2062,7 +2062,7 @@ olx.source.ClusterOptions.prototype.extent;
|
||||
* ```
|
||||
* See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
|
||||
* calculation point for polygons.
|
||||
* @type {undefined|function(ol.Feature):module:ol/geom/Point~Point}
|
||||
* @type {undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point}
|
||||
* @api
|
||||
*/
|
||||
olx.source.ClusterOptions.prototype.geometryFunction;
|
||||
@@ -3693,12 +3693,12 @@ olx.source.TileWMSOptions.prototype.transition;
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||
* features: (Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined),
|
||||
* features: (Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>|undefined),
|
||||
* format: (ol.format.Feature|undefined),
|
||||
* loader: (ol.FeatureLoader|undefined),
|
||||
* loader: (module:ol/Feature~FeatureLoader|undefined),
|
||||
* overlaps: (boolean|undefined),
|
||||
* strategy: (ol.LoadingStrategy|undefined),
|
||||
* url: (string|ol.FeatureUrlFunction|undefined),
|
||||
* url: (string|module:ol/Feature~FeatureUrlFunction|undefined),
|
||||
* useSpatialIndex: (boolean|undefined),
|
||||
* wrapX: (boolean|undefined)}}
|
||||
*/
|
||||
@@ -3716,7 +3716,7 @@ olx.source.VectorOptions.prototype.attributions;
|
||||
/**
|
||||
* Features. If provided as {@link ol.Collection}, the features in the source
|
||||
* and the collection will stay in sync.
|
||||
* @type {Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined}
|
||||
* @type {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.VectorOptions.prototype.features;
|
||||
@@ -3766,7 +3766,7 @@ olx.source.VectorOptions.prototype.format;
|
||||
* strategy: ol.loadingstrategy.bbox
|
||||
* });
|
||||
* ```
|
||||
* @type {ol.FeatureLoader|undefined}
|
||||
* @type {module:ol/Feature~FeatureLoader|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.VectorOptions.prototype.loader;
|
||||
@@ -3796,7 +3796,7 @@ olx.source.VectorOptions.prototype.strategy;
|
||||
* Setting this option instructs the source to load features using an XHR loader
|
||||
* (see {@link ol.featureloader.xhr}). Use a `string` and an
|
||||
* {@link ol.loadingstrategy.all} for a one-off download of all features from
|
||||
* the given URL. Use a {@link ol.FeatureUrlFunction} to generate the url with
|
||||
* the given URL. Use a {@link module:ol/Feature~FeatureUrlFunction} to generate the url with
|
||||
* other loading strategies.
|
||||
* Requires `format` to be set as well.
|
||||
* When default XHR feature loader is provided, the features will
|
||||
@@ -3807,7 +3807,7 @@ olx.source.VectorOptions.prototype.strategy;
|
||||
* defaultDataProjection constructor option on the format.
|
||||
* Note that if a source contains non-feature data, such as a GeoJSON geometry
|
||||
* or a KML NetworkLink, these will be ignored. Use a custom loader to load these.
|
||||
* @type {string|ol.FeatureUrlFunction|undefined}
|
||||
* @type {string|module:ol/Feature~FeatureUrlFunction|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.source.VectorOptions.prototype.url;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
* geometry being drawn. Default is 6 pixels. That value was chosen for
|
||||
* the draw interaction to behave correctly on mouse as well as on touch
|
||||
* devices.
|
||||
* @property {ol.Collection.<ol.Feature>|undefined} features Destination collection for the drawn features.
|
||||
* @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Destination collection for the drawn features.
|
||||
* @property {ol.source.Vector|undefined} source Destination source for the drawn features.
|
||||
* @property {number|undefined} dragVertexDelay Delay in milliseconds after pointerdown before the current vertex can be
|
||||
* dragged to its exact position. Default is 500 ms.
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_TranslateOptions
|
||||
* @property {ol.Collection.<ol.Feature>|undefined} features Only features contained in this collection will be able to be translated. If
|
||||
* @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Only features contained in this collection will be able to be translated. If
|
||||
* not specified, all features on the map will be able to be translated.
|
||||
* @property {undefined|Array.<ol.layer.Layer>|function(ol.layer.Layer): boolean} layers A list of layers from which features should be
|
||||
* translated. Alternatively, a filter function can be provided. The
|
||||
@@ -181,7 +181,7 @@
|
||||
* style is used (see {@link ol.style}).
|
||||
* @property {ol.source.Vector|undefined} source The vector source with features to modify. If a vector source is not
|
||||
* provided, a feature collection must be provided with the features option.
|
||||
* @property {ol.Collection.<ol.Feature>|undefined} features The features the interaction works on. If a feature collection is not
|
||||
* @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features The features the interaction works on. If a feature collection is not
|
||||
* provided, a vector source must be provided with the source option.
|
||||
* @property {boolean|undefined} wrapX Wrap the world horizontally on the sketch overlay. Default is `false`.
|
||||
*/
|
||||
@@ -270,11 +270,11 @@
|
||||
* @property {boolean|undefined} multi A boolean that determines if the default behaviour should select only
|
||||
* single features or all (overlapping) features at the clicked map
|
||||
* position. Default is false i.e single select
|
||||
* @property {ol.Collection.<ol.Feature>|undefined} features Collection where the interaction will place selected features. Optional. If
|
||||
* @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Collection where the interaction will place selected features. Optional. If
|
||||
* not set the interaction will create a collection. In any case the collection
|
||||
* used by the interaction is returned by
|
||||
* {@link ol.interaction.Select#getFeatures}.
|
||||
* @property {ol.SelectFilterFunction|undefined} filter A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and
|
||||
* @property {ol.SelectFilterFunction|undefined} filter A function that takes an {@link module:ol/Feature~Feature} and an {@link ol.layer.Layer} and
|
||||
* returns `true` if the feature may be selected or `false` otherwise.
|
||||
* @property {boolean|undefined} wrapX Wrap the world horizontally on the selection overlay. Default is `true`.
|
||||
* @property {number|undefined} hitTolerance Hit-detection tolerance. Pixels inside the radius around the given position
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
/**
|
||||
* @typedef {Object} interaction_SnapOptions
|
||||
* @property {ol.Collection.<ol.Feature>|undefined} features Snap to these features. Either this option or source should be provided.
|
||||
* @property {ol.Collection.<module:ol/Feature~Feature>|undefined} features Snap to these features. Either this option or source should be provided.
|
||||
* @property {boolean|undefined} edge Snap to edges. Default is `true`.
|
||||
* @property {boolean|undefined} vertex Snap to vertices. Default is `true`.
|
||||
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
|
||||
@@ -344,7 +344,7 @@
|
||||
* @property {number|undefined} radius Radius size in pixels. Default is `8`.
|
||||
* @property {number|undefined} blur Blur size in pixels. Default is `15`.
|
||||
* @property {number|undefined} shadow Shadow size in pixels. Default is `250`.
|
||||
* @property {string|function(ol.Feature):number|undefined} weight The feature attribute to use for the weight or a function that returns a
|
||||
* @property {string|function(module:ol/Feature~Feature):number|undefined} 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). Default is `weight`.
|
||||
* @property {ol.Extent|undefined} extent The bounding extent for layer rendering. The layer will not be rendered
|
||||
@@ -532,7 +532,7 @@
|
||||
* @property {ol.AttributionLike|undefined} attributions Attributions.
|
||||
* @property {number|undefined} distance Minimum distance in pixels between clusters. Default is `20`.
|
||||
* @property {ol.Extent|undefined} extent Extent.
|
||||
* @property {undefined|function(ol.Feature):module:ol/geom/Point~Point} geometryFunction Function that takes an {@link ol.Feature} as argument and returns an
|
||||
* @property {undefined|function(module:ol/Feature~Feature):module:ol/geom/Point~Point} geometryFunction Function that takes an {@link module:ol/Feature~Feature} as argument and returns an
|
||||
* {@link module:ol/geom/Point~Point} as cluster calculation point for the feature. When a
|
||||
* feature should not be considered for clustering, the function should return
|
||||
* `null`. The default, which works when the underyling source contains point
|
||||
@@ -977,11 +977,11 @@
|
||||
/**
|
||||
* @typedef {Object} source_VectorOptions
|
||||
* @property {ol.AttributionLike|undefined} attributions Attributions.
|
||||
* @property {Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined} features Features. If provided as {@link ol.Collection}, the features in the source
|
||||
* @property {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>|undefined} features Features. If provided as {@link ol.Collection}, the features in the source
|
||||
* and the collection will stay in sync.
|
||||
* @property {ol.format.Feature|undefined} format The feature format used by the XHR feature loader when `url` is set.
|
||||
* Required if `url` is set, otherwise ignored. Default is `undefined`.
|
||||
* @property {ol.FeatureLoader|undefined} loader The loader function used to load features, from a remote source for example.
|
||||
* @property {module:ol/Feature~FeatureLoader|undefined} loader The loader function used to load features, from a remote source for example.
|
||||
* If this is not set and `url` is set, the source will create and use an XHR
|
||||
* feature loader.
|
||||
*
|
||||
@@ -1021,10 +1021,10 @@
|
||||
* stroke operations.
|
||||
* @property {ol.LoadingStrategy|undefined} strategy The loading strategy to use. By default an {@link ol.loadingstrategy.all}
|
||||
* strategy is used, a one-off strategy which loads all features at once.
|
||||
* @property {string|ol.FeatureUrlFunction|undefined} url Setting this option instructs the source to load features using an XHR loader
|
||||
* @property {string|module:ol/Feature~FeatureUrlFunction|undefined} url Setting this option instructs the source to load features using an XHR loader
|
||||
* (see {@link ol.featureloader.xhr}). Use a `string` and an
|
||||
* {@link ol.loadingstrategy.all} for a one-off download of all features from
|
||||
* the given URL. Use a {@link ol.FeatureUrlFunction} to generate the url with
|
||||
* the given URL. Use a {@link module:ol/Feature~FeatureUrlFunction} to generate the url with
|
||||
* other loading strategies.
|
||||
* Requires `format` to be set as well.
|
||||
* When default XHR feature loader is provided, the features will
|
||||
|
||||
@@ -412,7 +412,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
|
||||
* @function
|
||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
EsriJSON.prototype.readFeature;
|
||||
@@ -425,7 +425,7 @@ EsriJSON.prototype.readFeature;
|
||||
* @function
|
||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
EsriJSON.prototype.readFeatures;
|
||||
@@ -461,7 +461,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
if (esriJSONObject.features) {
|
||||
const esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */ (object);
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
const esriJSONFeatures = esriJSONFeatureCollection.features;
|
||||
options.idField = object.objectIdFieldName;
|
||||
@@ -562,7 +562,7 @@ EsriJSON.prototype.writeGeometryObject = function(geometry, opt_options) {
|
||||
* Encode a feature as a EsriJSON Feature string.
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} EsriJSON.
|
||||
* @api
|
||||
@@ -573,7 +573,7 @@ EsriJSON.prototype.writeFeature;
|
||||
/**
|
||||
* Encode a feature as a esriJSON Feature object.
|
||||
*
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} Object.
|
||||
* @override
|
||||
@@ -606,7 +606,7 @@ EsriJSON.prototype.writeFeatureObject = function(feature, opt_options) {
|
||||
* Encode an array of features as EsriJSON.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} EsriJSON.
|
||||
* @api
|
||||
@@ -617,7 +617,7 @@ EsriJSON.prototype.writeFeatures;
|
||||
/**
|
||||
* Encode an array of features as a EsriJSON object.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} EsriJSON Object.
|
||||
* @override
|
||||
|
||||
@@ -53,7 +53,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
||||
* instantiated in apps.
|
||||
* Base class for feature formats.
|
||||
* {ol.format.Feature} subclasses provide the ability to decode and encode
|
||||
* {@link ol.Feature} objects from a variety of commonly used geospatial
|
||||
* {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial
|
||||
* file formats. See the documentation for each format for more details.
|
||||
*
|
||||
* @constructor
|
||||
@@ -136,7 +136,7 @@ FeatureFormat.prototype.getType = function() {};
|
||||
* @abstract
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
||||
|
||||
@@ -147,7 +147,7 @@ FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
||||
* @abstract
|
||||
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
|
||||
|
||||
@@ -177,7 +177,7 @@ FeatureFormat.prototype.readProjection = function(source) {};
|
||||
* Encode a feature in this format.
|
||||
*
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} Result.
|
||||
*/
|
||||
@@ -188,7 +188,7 @@ FeatureFormat.prototype.writeFeature = function(feature, opt_options) {};
|
||||
* Encode an array of features in this format.
|
||||
*
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} Result.
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ const GML = GML3;
|
||||
* Encode an array of features in GML 3.1.1 Simple Features.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -34,7 +34,7 @@ GML.prototype.writeFeatures;
|
||||
* Encode an array of features in the GML 3.1.1 format as an XML node.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @api
|
||||
|
||||
@@ -168,7 +168,7 @@ GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeNam
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
|
||||
@@ -963,7 +963,7 @@ GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
@@ -1010,7 +1010,7 @@ GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -1120,7 +1120,7 @@ GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
|
||||
* Encode an array of features in GML 3.1.1 Simple Features.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -1131,7 +1131,7 @@ GML3.prototype.writeFeatures;
|
||||
/**
|
||||
* Encode an array of features in the GML 3.1.1 format as an XML node.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
|
||||
@@ -135,7 +135,7 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/;
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {Array.<ol.Feature> | undefined} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature> | undefined} Features.
|
||||
*/
|
||||
GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
|
||||
const localName = node.localName;
|
||||
@@ -243,7 +243,7 @@ GMLBase.prototype.readGeometryElement = function(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
GMLBase.prototype.readFeatureElement = function(node, objectStack) {
|
||||
let n;
|
||||
@@ -573,7 +573,7 @@ GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
GMLBase.prototype.readFeatures;
|
||||
|
||||
@@ -20,7 +20,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {function(ol.Feature, Node)|undefined} readExtensions Callback function
|
||||
* @property {function(module:ol/Feature~Feature, Node)|undefined} readExtensions Callback function
|
||||
* to process `extensions` nodes. To prevent memory leaks, this callback function must
|
||||
* not store any references to the node. Note that the `extensions`
|
||||
* node is not allowed in GPX 1.0. Moreover, only `extensions`
|
||||
@@ -50,7 +50,7 @@ const GPX = function(opt_options) {
|
||||
this.defaultDataProjection = getProjection('EPSG:4326');
|
||||
|
||||
/**
|
||||
* @type {function(ol.Feature, Node)|undefined}
|
||||
* @type {function(module:ol/Feature~Feature, Node)|undefined}
|
||||
* @private
|
||||
*/
|
||||
this.readExtensions_ = options.readExtensions;
|
||||
@@ -80,7 +80,7 @@ const SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Object.<string, function(Node, Array.<*>): (ol.Feature|undefined)>}
|
||||
* @type {Object.<string, function(Node, Array.<*>): (module:ol/Feature~Feature|undefined)>}
|
||||
*/
|
||||
const FEATURE_READER = {
|
||||
'rte': readRte,
|
||||
@@ -364,7 +364,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
|
||||
* @return {Node|undefined} Node.
|
||||
*/
|
||||
function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {
|
||||
const geometry = /** @type {ol.Feature} */ (value).getGeometry();
|
||||
const geometry = /** @type {module:ol/Feature~Feature} */ (value).getGeometry();
|
||||
if (geometry) {
|
||||
const nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];
|
||||
if (nodeName) {
|
||||
@@ -531,7 +531,7 @@ function parseTrkSeg(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature|undefined} Track.
|
||||
* @return {module:ol/Feature~Feature|undefined} Track.
|
||||
*/
|
||||
function readRte(node, objectStack) {
|
||||
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||
@@ -560,7 +560,7 @@ function readRte(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature|undefined} Track.
|
||||
* @return {module:ol/Feature~Feature|undefined} Track.
|
||||
*/
|
||||
function readTrk(node, objectStack) {
|
||||
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||
@@ -592,7 +592,7 @@ function readTrk(node, objectStack) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {ol.Feature|undefined} Waypoint.
|
||||
* @return {module:ol/Feature~Feature|undefined} Waypoint.
|
||||
*/
|
||||
function readWpt(node, objectStack) {
|
||||
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||
@@ -612,7 +612,7 @@ function readWpt(node, objectStack) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array.<ol.Feature>} features List of features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features List of features.
|
||||
* @private
|
||||
*/
|
||||
GPX.prototype.handleReadExtensions_ = function(features) {
|
||||
@@ -638,7 +638,7 @@ GPX.prototype.handleReadExtensions_ = function(features) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
GPX.prototype.readFeature;
|
||||
@@ -672,7 +672,7 @@ GPX.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
GPX.prototype.readFeatures;
|
||||
@@ -686,7 +686,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
return [];
|
||||
}
|
||||
if (node.localName == 'gpx') {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = pushParseAndPop([], GPX_PARSERS,
|
||||
node, [this.getReadOptions(node, opt_options)]);
|
||||
if (features) {
|
||||
@@ -776,7 +776,7 @@ function writeWptType(node, coordinate, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeRte(node, feature, objectStack) {
|
||||
@@ -800,7 +800,7 @@ function writeRte(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeTrk(node, feature, objectStack) {
|
||||
@@ -840,7 +840,7 @@ function writeTrkSeg(node, lineString, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeWpt(node, feature, objectStack) {
|
||||
@@ -863,7 +863,7 @@ function writeWpt(node, feature, objectStack) {
|
||||
* as tracks (`<trk>`).
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -876,7 +876,7 @@ GPX.prototype.writeFeatures;
|
||||
* LineString geometries are output as routes (`<rte>`), and MultiLineString
|
||||
* as tracks (`<trk>`).
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
|
||||
@@ -332,12 +332,12 @@ function writePolygonGeometry(geometry, opt_options) {
|
||||
* Read a feature from a GeoJSON Feature source. Only works for Feature or
|
||||
* geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read
|
||||
* FeatureCollection source. If feature at source has an id, it will be used
|
||||
* as Feature id by calling {@link ol.Feature#setId} internally.
|
||||
* as Feature id by calling {@link module:ol/Feature~Feature#setId} internally.
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
GeoJSON.prototype.readFeature;
|
||||
@@ -351,7 +351,7 @@ GeoJSON.prototype.readFeature;
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
GeoJSON.prototype.readFeatures;
|
||||
@@ -397,7 +397,7 @@ GeoJSON.prototype.readFeatureFromObject = function(object, opt_options) {
|
||||
*/
|
||||
GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
const geoJSONObject = /** @type {GeoJSONObject} */ (object);
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
let features = null;
|
||||
if (geoJSONObject.type === 'FeatureCollection') {
|
||||
const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);
|
||||
@@ -468,7 +468,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) {
|
||||
* Encode a feature as a GeoJSON Feature string.
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} GeoJSON.
|
||||
* @override
|
||||
@@ -480,7 +480,7 @@ GeoJSON.prototype.writeFeature;
|
||||
/**
|
||||
* Encode a feature as a GeoJSON Feature object.
|
||||
*
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {GeoJSONFeature} Object.
|
||||
* @override
|
||||
@@ -517,7 +517,7 @@ GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
|
||||
* Encode an array of features as GeoJSON.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} GeoJSON.
|
||||
* @api
|
||||
@@ -528,7 +528,7 @@ GeoJSON.prototype.writeFeatures;
|
||||
/**
|
||||
* Encode an array of features as a GeoJSON object.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {GeoJSONFeatureCollection} GeoJSON Object.
|
||||
* @override
|
||||
|
||||
@@ -95,7 +95,7 @@ const NEWLINE_RE = /\r\n|\r|\n/;
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
IGC.prototype.readFeature;
|
||||
@@ -185,7 +185,7 @@ IGC.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
IGC.prototype.readFeatures;
|
||||
|
||||
@@ -69,7 +69,7 @@ JSONFeature.prototype.readFeatures = function(source, opt_options) {
|
||||
* @param {Object} object Object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
|
||||
|
||||
@@ -79,7 +79,7 @@ JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
|
||||
* @param {Object} object Object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
|
||||
|
||||
@@ -130,7 +130,7 @@ JSONFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} Object.
|
||||
*/
|
||||
@@ -147,7 +147,7 @@ JSONFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {Object} Object.
|
||||
*/
|
||||
|
||||
@@ -405,7 +405,7 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
|
||||
|
||||
return (
|
||||
/**
|
||||
* @param {ol.Feature} feature feature.
|
||||
* @param {module:ol/Feature~Feature} feature feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {Array.<ol.style.Style>} Style.
|
||||
*/
|
||||
@@ -1652,7 +1652,7 @@ const PLACEMARK_PARSERS = makeStructureNS(
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {Array.<ol.Feature>|undefined} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>|undefined} Features.
|
||||
*/
|
||||
KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
// FIXME use scope somehow
|
||||
@@ -1664,7 +1664,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
'Style': this.readSharedStyle_.bind(this),
|
||||
'StyleMap': this.readSharedStyleMap_.bind(this)
|
||||
});
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = pushParseAndPop([], parsersNS, node, objectStack, this);
|
||||
if (features) {
|
||||
return features;
|
||||
@@ -1678,7 +1678,7 @@ KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {ol.Feature|undefined} Feature.
|
||||
* @return {module:ol/Feature~Feature|undefined} Feature.
|
||||
*/
|
||||
KML.prototype.readPlacemark_ = function(node, objectStack) {
|
||||
const object = pushParseAndPop({'geometry': null},
|
||||
@@ -1782,7 +1782,7 @@ KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
KML.prototype.readFeature;
|
||||
@@ -1813,7 +1813,7 @@ KML.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
KML.prototype.readFeatures;
|
||||
@@ -2205,7 +2205,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @this {ol.format.KML}
|
||||
*/
|
||||
@@ -2658,7 +2658,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
|
||||
* FIXME currently we do serialize arbitrary/custom feature properties
|
||||
* (ExtendedData).
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @this {ol.format.KML}
|
||||
*/
|
||||
@@ -2952,7 +2952,7 @@ const KML_SERIALIZERS = makeStructureNS(
|
||||
* MultiLineStrings, and MultiPolygons are output as MultiGeometries.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {string} Result.
|
||||
* @api
|
||||
@@ -2964,7 +2964,7 @@ KML.prototype.writeFeatures;
|
||||
* Encode an array of features in the KML format as an XML node. GeometryCollections,
|
||||
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
|
||||
@@ -26,7 +26,7 @@ import RenderFeature from '../render/Feature.js';
|
||||
* @typedef {Object} Options
|
||||
* @property {undefined|function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType~GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} featureClass
|
||||
* Class for features returned by {@link ol.format.MVT#readFeatures}. Set to
|
||||
* {@link ol.Feature} to get full editing and geometry support at the cost of
|
||||
* {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
|
||||
* decreased rendering performance. The default is {@link ol.render.Feature},
|
||||
* which is optimized for rendering and hit detection.
|
||||
* @property {string|undefined} geometryName Geometry name to use when creating
|
||||
@@ -297,7 +297,7 @@ function getGeometryType(type, numEnds) {
|
||||
* @param {ol.ext.PBF} pbf PBF
|
||||
* @param {Object} rawFeature Raw Mapbox feature.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature|ol.render.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature|ol.render.Feature} Feature.
|
||||
*/
|
||||
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
|
||||
const type = rawFeature.type;
|
||||
@@ -387,7 +387,7 @@ MVT.prototype.readFeatures = function(source, opt_options) {
|
||||
|
||||
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
|
||||
const pbfLayers = pbf.readFields(layersPBFReader, {});
|
||||
/** @type {Array.<ol.Feature|ol.render.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature|ol.render.Feature>} */
|
||||
const features = [];
|
||||
for (const name in pbfLayers) {
|
||||
if (layers && layers.indexOf(name) == -1) {
|
||||
|
||||
@@ -146,7 +146,7 @@ function readTag(node, objectStack) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
OSMXML.prototype.readFeatures;
|
||||
|
||||
@@ -272,7 +272,7 @@ export function encodeUnsignedInteger(num) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
Polyline.prototype.readFeature;
|
||||
@@ -294,7 +294,7 @@ Polyline.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
Polyline.prototype.readFeatures;
|
||||
|
||||
@@ -56,7 +56,7 @@ TextFeature.prototype.readFeature = function(source, opt_options) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
|
||||
|
||||
@@ -74,7 +74,7 @@ TextFeature.prototype.readFeatures = function(source, opt_options) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
|
||||
|
||||
@@ -125,7 +125,7 @@ TextFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Features.
|
||||
* @param {module:ol/Feature~Feature} feature Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
@@ -143,7 +143,7 @@ TextFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
|
||||
@@ -244,7 +244,7 @@ function readMultiPolygonGeometry(object, arcs) {
|
||||
* object to.
|
||||
* @param {string} name Name of the `Topology`'s child object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Array of features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Array of features.
|
||||
*/
|
||||
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
|
||||
const geometries = collection.geometries;
|
||||
@@ -268,7 +268,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
|
||||
* object to.
|
||||
* @param {string} name Name of the `Topology`'s child object.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
|
||||
let geometry;
|
||||
@@ -304,7 +304,7 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name,
|
||||
*
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
TopoJSON.prototype.readFeatures;
|
||||
@@ -326,7 +326,7 @@ TopoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
||||
if (transform) {
|
||||
transformArcs(arcs, scale, translate);
|
||||
}
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
const topoJSONFeatures = topoJSONTopology.objects;
|
||||
const property = this.layerName_;
|
||||
|
||||
@@ -188,7 +188,7 @@ WFS.prototype.setFeatureType = function(featureType) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
WFS.prototype.readFeatures;
|
||||
@@ -425,7 +425,7 @@ const QUERY_SERIALIZERS = {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
function writeFeature(node, feature, objectStack) {
|
||||
@@ -476,7 +476,7 @@ function getTypeName(featurePrefix, featureType) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
function writeDelete(node, feature, objectStack) {
|
||||
@@ -511,7 +511,7 @@ const TRANSACTION_SERIALIZERS = {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {Array.<*>} objectStack Node stack.
|
||||
*/
|
||||
function writeUpdate(node, feature, objectStack) {
|
||||
@@ -997,9 +997,9 @@ WFS.prototype.writeGetFeature = function(options) {
|
||||
/**
|
||||
* Encode format as WFS `Transaction` and return the Node.
|
||||
*
|
||||
* @param {Array.<ol.Feature>} inserts The features to insert.
|
||||
* @param {Array.<ol.Feature>} updates The features to update.
|
||||
* @param {Array.<ol.Feature>} deletes The features to delete.
|
||||
* @param {Array.<module:ol/Feature~Feature>} inserts The features to insert.
|
||||
* @param {Array.<module:ol/Feature~Feature>} updates The features to update.
|
||||
* @param {Array.<module:ol/Feature~Feature>} deletes The features to delete.
|
||||
* @param {module:ol/format/WFS~WriteTransactionOptions} options Write options.
|
||||
* @return {Node} Result.
|
||||
* @api
|
||||
|
||||
@@ -726,7 +726,7 @@ WKT.prototype.parse_ = function(wkt) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
* @api
|
||||
*/
|
||||
WKT.prototype.readFeature;
|
||||
@@ -752,7 +752,7 @@ WKT.prototype.readFeatureFromText = function(text, opt_options) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
WKT.prototype.readFeatures;
|
||||
@@ -862,7 +862,7 @@ Parser.prototype.parseGeometry_ = function() {
|
||||
* Encode a feature as a WKT string.
|
||||
*
|
||||
* @function
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} WKT string.
|
||||
* @api
|
||||
@@ -886,7 +886,7 @@ WKT.prototype.writeFeatureText = function(feature, opt_options) {
|
||||
* Encode an array of features as a WKT string.
|
||||
*
|
||||
* @function
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
|
||||
* @return {string} WKT string.
|
||||
* @api
|
||||
|
||||
@@ -89,13 +89,13 @@ WMSGetFeatureInfo.prototype.setLayers = function(layers) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array.<*>} objectStack Object stack.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @private
|
||||
*/
|
||||
WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
||||
node.setAttribute('namespaceURI', this.featureNS_);
|
||||
const localName = node.localName;
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
let features = [];
|
||||
if (node.childNodes.length === 0) {
|
||||
return features;
|
||||
@@ -152,7 +152,7 @@ WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
||||
* @function
|
||||
* @param {Document|Node|Object|string} source Source.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
WMSGetFeatureInfo.prototype.readFeatures;
|
||||
|
||||
@@ -59,7 +59,7 @@ XMLFeature.prototype.readFeature = function(source, opt_options) {
|
||||
/**
|
||||
* @param {Document} doc Document.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
||||
const features = this.readFeaturesFromDocument(doc, opt_options);
|
||||
@@ -74,7 +74,7 @@ XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @return {ol.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature} Feature.
|
||||
*/
|
||||
XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
return null; // not implemented
|
||||
@@ -103,10 +103,10 @@ XMLFeature.prototype.readFeatures = function(source, opt_options) {
|
||||
* @param {Document} doc Document.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
for (let n = doc.firstChild; n; n = n.nextSibling) {
|
||||
if (n.nodeType == Node.ELEMENT_NODE) {
|
||||
@@ -122,7 +122,7 @@ XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
|
||||
* @param {Node} node Node.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
|
||||
|
||||
@@ -214,7 +214,7 @@ XMLFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {Node} Node.
|
||||
@@ -234,7 +234,7 @@ XMLFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @param {module:ol/format/Feature~WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ const DragAndDropEventType = {
|
||||
* @implements {oli.interaction.DragAndDropEvent}
|
||||
* @param {ol.interaction.DragAndDropEventType} type Type.
|
||||
* @param {File} file File.
|
||||
* @param {Array.<ol.Feature>=} opt_features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>=} opt_features Features.
|
||||
* @param {module:ol/proj/Projection~Projection=} opt_projection Projection.
|
||||
*/
|
||||
const DragAndDropEvent = function(type, file, opt_features, opt_projection) {
|
||||
@@ -44,7 +44,7 @@ const DragAndDropEvent = function(type, file, opt_features, opt_projection) {
|
||||
|
||||
/**
|
||||
* The features parsed from dropped data.
|
||||
* @type {Array.<ol.Feature>|undefined}
|
||||
* @type {Array.<module:ol/Feature~Feature>|undefined}
|
||||
* @api
|
||||
*/
|
||||
this.features = opt_features;
|
||||
@@ -238,7 +238,7 @@ DragAndDrop.prototype.setMap = function(map) {
|
||||
* @param {string} text Text.
|
||||
* @param {module:ol/format/Feature~ReadOptions} options Read options.
|
||||
* @private
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
*/
|
||||
DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) {
|
||||
try {
|
||||
|
||||
@@ -70,7 +70,7 @@ const DrawEventType = {
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.DrawEvent}
|
||||
* @param {ol.interaction.DrawEventType} type Type.
|
||||
* @param {ol.Feature} feature The feature drawn.
|
||||
* @param {module:ol/Feature~Feature} feature The feature drawn.
|
||||
*/
|
||||
const DrawEvent = function(type, feature) {
|
||||
|
||||
@@ -78,7 +78,7 @@ const DrawEvent = function(type, feature) {
|
||||
|
||||
/**
|
||||
* The feature being drawn.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @api
|
||||
*/
|
||||
this.feature = feature;
|
||||
@@ -145,7 +145,7 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Target collection for drawn features.
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features ? options.features : null;
|
||||
@@ -281,14 +281,14 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Sketch feature.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.sketchFeature_ = null;
|
||||
|
||||
/**
|
||||
* Sketch point.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.sketchPoint_ = null;
|
||||
@@ -302,7 +302,7 @@ const Draw = function(options) {
|
||||
|
||||
/**
|
||||
* Sketch line. Used when drawing polygon.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.sketchLine_ = null;
|
||||
@@ -810,7 +810,7 @@ Draw.prototype.finishDrawing = function() {
|
||||
|
||||
/**
|
||||
* Stop drawing without adding the sketch feature to the target layer.
|
||||
* @return {ol.Feature} The sketch feature (or null if none).
|
||||
* @return {module:ol/Feature~Feature} The sketch feature (or null if none).
|
||||
* @private
|
||||
*/
|
||||
Draw.prototype.abortDrawing_ = function() {
|
||||
@@ -830,7 +830,7 @@ Draw.prototype.abortDrawing_ = function() {
|
||||
* Extend an existing geometry by adding additional points. This only works
|
||||
* on features with `LineString` geometries, where the interaction will
|
||||
* extend lines by adding points to the end of the coordinates array.
|
||||
* @param {!ol.Feature} feature Feature to be extended.
|
||||
* @param {!module:ol/Feature~Feature} feature Feature to be extended.
|
||||
* @api
|
||||
*/
|
||||
Draw.prototype.extend = function(feature) {
|
||||
|
||||
@@ -89,14 +89,14 @@ const ExtentInteraction = function(opt_options) {
|
||||
|
||||
/**
|
||||
* Feature for displaying the visible extent
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.extentFeature_ = null;
|
||||
|
||||
/**
|
||||
* Feature for displaying the visible pointer
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.vertexFeature_ = null;
|
||||
@@ -382,7 +382,7 @@ ExtentInteraction.prototype.handlePointerMove_ = function(mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/extent~Extent} extent extent
|
||||
* @returns {ol.Feature} extent as featrue
|
||||
* @returns {module:ol/Feature~Feature} extent as featrue
|
||||
* @private
|
||||
*/
|
||||
ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) {
|
||||
@@ -409,7 +409,7 @@ ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function(extent) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/coordinate~Coordinate} vertex location of feature
|
||||
* @returns {ol.Feature} vertex as feature
|
||||
* @returns {module:ol/Feature~Feature} vertex as feature
|
||||
* @private
|
||||
*/
|
||||
ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function(vertex) {
|
||||
|
||||
@@ -52,7 +52,7 @@ const ModifyEventType = {
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.ModifyEvent}
|
||||
* @param {ModifyEventType} type Type.
|
||||
* @param {ol.Collection.<ol.Feature>} features The features modified.
|
||||
* @param {ol.Collection.<module:ol/Feature~Feature>} features The features modified.
|
||||
* @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
|
||||
* {@link ol.MapBrowserPointerEvent}.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ export const ModifyEvent = function(type, features, mapBrowserPointerEvent) {
|
||||
|
||||
/**
|
||||
* The features being modified.
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.features = features;
|
||||
@@ -138,7 +138,7 @@ const Modify = function(options) {
|
||||
|
||||
/**
|
||||
* Editing vertex.
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.vertexFeature_ = null;
|
||||
@@ -223,7 +223,7 @@ const Modify = function(options) {
|
||||
/**
|
||||
* @const
|
||||
* @private
|
||||
* @type {!Object.<string, function(ol.Feature, module:ol/geom/Geometry~Geometry)>}
|
||||
* @type {!Object.<string, function(module:ol/Feature~Feature, module:ol/geom/Geometry~Geometry)>}
|
||||
*/
|
||||
this.SEGMENT_WRITERS_ = {
|
||||
'Point': this.writePointGeometry_,
|
||||
@@ -260,7 +260,7 @@ const Modify = function(options) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = features;
|
||||
@@ -298,7 +298,7 @@ const CIRCLE_CIRCUMFERENCE_INDEX = 1;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.addFeature_ = function(feature) {
|
||||
@@ -329,7 +329,7 @@ Modify.prototype.willModifyFeatures_ = function(evt) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.removeFeature_ = function(feature) {
|
||||
@@ -346,7 +346,7 @@ Modify.prototype.removeFeature_ = function(feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.removeFeatureSegmentData_ = function(feature) {
|
||||
@@ -415,7 +415,7 @@ Modify.prototype.handleSourceRemove_ = function(event) {
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.handleFeatureAdd_ = function(evt) {
|
||||
this.addFeature_(/** @type {ol.Feature} */ (evt.element));
|
||||
this.addFeature_(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
};
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ Modify.prototype.handleFeatureAdd_ = function(evt) {
|
||||
*/
|
||||
Modify.prototype.handleFeatureChange_ = function(evt) {
|
||||
if (!this.changingFeature_) {
|
||||
const feature = /** @type {ol.Feature} */ (evt.target);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (evt.target);
|
||||
this.removeFeature_(feature);
|
||||
this.addFeature_(feature);
|
||||
}
|
||||
@@ -437,13 +437,13 @@ Modify.prototype.handleFeatureChange_ = function(evt) {
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.handleFeatureRemove_ = function(evt) {
|
||||
const feature = /** @type {ol.Feature} */ (evt.element);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (evt.element);
|
||||
this.removeFeature_(feature);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Point~Point} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -459,7 +459,7 @@ Modify.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -480,7 +480,7 @@ Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/LineString~LineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -500,7 +500,7 @@ Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -524,7 +524,7 @@ Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -548,7 +548,7 @@ Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -581,7 +581,7 @@ Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||
* {@link CIRCLE_CIRCUMFERENCE_INDEX} is
|
||||
* the circumference, and is not a line segment.
|
||||
*
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -607,7 +607,7 @@ Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -621,7 +621,7 @@ Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry)
|
||||
|
||||
/**
|
||||
* @param {module:ol/coordinate~Coordinate} coordinates Coordinates.
|
||||
* @return {ol.Feature} Vertex feature.
|
||||
* @return {module:ol/Feature~Feature} Vertex feature.
|
||||
* @private
|
||||
*/
|
||||
Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
|
||||
|
||||
@@ -35,8 +35,8 @@ const SelectEventType = {
|
||||
* this type.
|
||||
*
|
||||
* @param {SelectEventType} type The event type.
|
||||
* @param {Array.<ol.Feature>} selected Selected features.
|
||||
* @param {Array.<ol.Feature>} deselected Deselected features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} selected Selected features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} deselected Deselected features.
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Associated
|
||||
* {@link ol.MapBrowserEvent}.
|
||||
* @implements {oli.SelectEvent}
|
||||
@@ -48,14 +48,14 @@ const SelectEvent = function(type, selected, deselected, mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* Selected features array.
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.selected = selected;
|
||||
|
||||
/**
|
||||
* Deselected features array.
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.deselected = deselected;
|
||||
@@ -198,7 +198,7 @@ inherits(Select, Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @private
|
||||
*/
|
||||
@@ -210,7 +210,7 @@ Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
|
||||
|
||||
/**
|
||||
* Get the selected features.
|
||||
* @return {ol.Collection.<ol.Feature>} Features collection.
|
||||
* @return {ol.Collection.<module:ol/Feature~Feature>} Features collection.
|
||||
* @api
|
||||
*/
|
||||
Select.prototype.getFeatures = function() {
|
||||
@@ -233,7 +233,7 @@ Select.prototype.getHitTolerance = function() {
|
||||
* the (last) selected feature. Note that this will not work with any
|
||||
* programmatic method like pushing features to
|
||||
* {@link ol.interaction.Select#getFeatures collection}.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature
|
||||
* @return {ol.layer.Vector} Layer.
|
||||
* @api
|
||||
*/
|
||||
@@ -270,7 +270,7 @@ function handleEvent(mapBrowserEvent) {
|
||||
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
|
||||
(
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @return {boolean|undefined} Continue to iterate over the features.
|
||||
*/
|
||||
@@ -303,7 +303,7 @@ function handleEvent(mapBrowserEvent) {
|
||||
map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
|
||||
(
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @return {boolean|undefined} Continue to iterate over the features.
|
||||
*/
|
||||
@@ -394,7 +394,7 @@ function getDefaultStyleFunction() {
|
||||
Select.prototype.addFeature_ = function(evt) {
|
||||
const map = this.getMap();
|
||||
if (map) {
|
||||
map.skipFeature(/** @type {ol.Feature} */ (evt.element));
|
||||
map.skipFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -406,13 +406,13 @@ Select.prototype.addFeature_ = function(evt) {
|
||||
Select.prototype.removeFeature_ = function(evt) {
|
||||
const map = this.getMap();
|
||||
if (map) {
|
||||
map.unskipFeature(/** @type {ol.Feature} */ (evt.element));
|
||||
map.unskipFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
|
||||
|
||||
@@ -68,7 +68,7 @@ const Snap = function(opt_options) {
|
||||
this.edge_ = options.edge !== undefined ? options.edge : true;
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features ? options.features : null;
|
||||
@@ -97,7 +97,7 @@ const Snap = function(opt_options) {
|
||||
* If a feature geometry changes while a pointer drag|move event occurs, the
|
||||
* feature doesn't get updated right away. It will be at the next 'pointerup'
|
||||
* event fired.
|
||||
* @type {!Object.<number, ol.Feature>}
|
||||
* @type {!Object.<number, module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.pendingFeatures_ = {};
|
||||
@@ -134,7 +134,7 @@ const Snap = function(opt_options) {
|
||||
/**
|
||||
* @const
|
||||
* @private
|
||||
* @type {Object.<string, function(ol.Feature, module:ol/geom/Geometry~Geometry)>}
|
||||
* @type {Object.<string, function(module:ol/Feature~Feature, module:ol/geom/Geometry~Geometry)>}
|
||||
*/
|
||||
this.SEGMENT_WRITERS_ = {
|
||||
'Point': this.writePointGeometry_,
|
||||
@@ -154,7 +154,7 @@ inherits(Snap, PointerInteraction);
|
||||
|
||||
/**
|
||||
* Add a feature to the collection of features that we may snap to.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {boolean=} opt_listen Whether to listen to the feature change or not
|
||||
* Defaults to `true`.
|
||||
* @api
|
||||
@@ -181,7 +181,7 @@ Snap.prototype.addFeature = function(feature, opt_listen) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.forEachFeatureAdd_ = function(feature) {
|
||||
@@ -190,7 +190,7 @@ Snap.prototype.forEachFeatureAdd_ = function(feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.forEachFeatureRemove_ = function(feature) {
|
||||
@@ -199,7 +199,7 @@ Snap.prototype.forEachFeatureRemove_ = function(feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Collection.<ol.Feature>|Array.<ol.Feature>} Features.
|
||||
* @return {ol.Collection.<module:ol/Feature~Feature>|Array.<module:ol/Feature~Feature>} Features.
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.getFeatures_ = function() {
|
||||
@@ -209,7 +209,7 @@ Snap.prototype.getFeatures_ = function() {
|
||||
} else if (this.source_) {
|
||||
features = this.source_.getFeatures();
|
||||
}
|
||||
return /** @type {!Array.<ol.Feature>|!ol.Collection.<ol.Feature>} */ (features);
|
||||
return /** @type {!Array.<module:ol/Feature~Feature>|!ol.Collection.<module:ol/Feature~Feature>} */ (features);
|
||||
};
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ Snap.prototype.handleFeatureAdd_ = function(evt) {
|
||||
} else if (evt instanceof CollectionEvent) {
|
||||
feature = evt.element;
|
||||
}
|
||||
this.addFeature(/** @type {ol.Feature} */ (feature));
|
||||
this.addFeature(/** @type {module:ol/Feature~Feature} */ (feature));
|
||||
};
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ Snap.prototype.handleFeatureRemove_ = function(evt) {
|
||||
} else if (evt instanceof CollectionEvent) {
|
||||
feature = evt.element;
|
||||
}
|
||||
this.removeFeature(/** @type {ol.Feature} */ (feature));
|
||||
this.removeFeature(/** @type {module:ol/Feature~Feature} */ (feature));
|
||||
};
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ Snap.prototype.handleFeatureRemove_ = function(evt) {
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.handleFeatureChange_ = function(evt) {
|
||||
const feature = /** @type {ol.Feature} */ (evt.target);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (evt.target);
|
||||
if (this.handlingDownUpSequence) {
|
||||
const uid = getUid(feature);
|
||||
if (!(uid in this.pendingFeatures_)) {
|
||||
@@ -262,7 +262,7 @@ Snap.prototype.handleFeatureChange_ = function(evt) {
|
||||
|
||||
/**
|
||||
* Remove a feature from the collection of features that we may snap to.
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {boolean=} opt_unlisten Whether to unlisten to the feature change
|
||||
* or not. Defaults to `true`.
|
||||
* @api
|
||||
@@ -417,7 +417,7 @@ Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @private
|
||||
*/
|
||||
Snap.prototype.updateFeature_ = function(feature) {
|
||||
@@ -427,7 +427,7 @@ Snap.prototype.updateFeature_ = function(feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -446,7 +446,7 @@ Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -462,7 +462,7 @@ Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/LineString~LineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -480,7 +480,7 @@ Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -501,7 +501,7 @@ Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -519,7 +519,7 @@ Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -543,7 +543,7 @@ Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Point~Point} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
@@ -558,7 +558,7 @@ Snap.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature
|
||||
* @param {module:ol/Feature~Feature} feature Feature
|
||||
* @param {module:ol/geom/Polygon~Polygon} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@ const TranslateEventType = {
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.interaction.TranslateEvent}
|
||||
* @param {ol.interaction.TranslateEventType} type Type.
|
||||
* @param {ol.Collection.<ol.Feature>} features The features translated.
|
||||
* @param {ol.Collection.<module:ol/Feature~Feature>} features The features translated.
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate The event coordinate.
|
||||
*/
|
||||
export const TranslateEvent = function(type, features, coordinate) {
|
||||
@@ -55,7 +55,7 @@ export const TranslateEvent = function(type, features, coordinate) {
|
||||
|
||||
/**
|
||||
* The features being translated.
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @api
|
||||
*/
|
||||
this.features = features;
|
||||
@@ -101,7 +101,7 @@ const Translate = function(opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
* @private
|
||||
*/
|
||||
this.features_ = options.features !== undefined ? options.features : null;
|
||||
@@ -134,7 +134,7 @@ const Translate = function(opt_options) {
|
||||
this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
|
||||
|
||||
/**
|
||||
* @type {ol.Feature}
|
||||
* @type {module:ol/Feature~Feature}
|
||||
* @private
|
||||
*/
|
||||
this.lastFeature_ = null;
|
||||
@@ -243,7 +243,7 @@ function handleMoveEvent(event) {
|
||||
* features.
|
||||
* @param {module:ol~Pixel} pixel Pixel coordinate to test for intersection.
|
||||
* @param {ol.PluggableMap} map Map to test the intersection on.
|
||||
* @return {ol.Feature} Returns the feature found at the specified pixel
|
||||
* @return {module:ol/Feature~Feature} Returns the feature found at the specified pixel
|
||||
* coordinates.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -129,7 +129,7 @@ VectorLayer.prototype.getRenderBuffer = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @return {function(ol.Feature, ol.Feature): number|null|undefined} Render
|
||||
* @return {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null|undefined} Render
|
||||
* order.
|
||||
*/
|
||||
VectorLayer.prototype.getRenderOrder = function() {
|
||||
|
||||
@@ -12,7 +12,7 @@ import {transform2D} from '../geom/flat/transform.js';
|
||||
import {create as createTransform, compose as composeTransform} from '../transform.js';
|
||||
|
||||
/**
|
||||
* Lightweight, read-only, {@link ol.Feature} and {@link module:ol/geom/Geometry~Geometry} like
|
||||
* Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like
|
||||
* structure, optimized for vector tile rendering and styling. Geometry access
|
||||
* through the API is limited to getting the type and extent of the geometry.
|
||||
*
|
||||
@@ -205,7 +205,7 @@ RenderFeature.prototype.getFlatCoordinates =
|
||||
|
||||
|
||||
/**
|
||||
* For API compatibility with {@link ol.Feature}, this method is useful when
|
||||
* For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when
|
||||
* determining the geometry type in style function (see {@link #getType}).
|
||||
* @return {ol.render.Feature} Feature.
|
||||
* @api
|
||||
|
||||
@@ -17,7 +17,7 @@ const VectorContext = function() {
|
||||
* Render a geometry with a custom renderer.
|
||||
*
|
||||
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {Function} renderer Renderer.
|
||||
*/
|
||||
VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
|
||||
@@ -41,13 +41,13 @@ VectorContext.prototype.setStyle = function(style) {};
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Circle~Circle} circleGeometry Circle geometry.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawCircle = function(circleGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
*/
|
||||
VectorContext.prototype.drawFeature = function(feature, style) {};
|
||||
@@ -56,7 +56,7 @@ VectorContext.prototype.drawFeature = function(feature, style) {};
|
||||
/**
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometryCollectionGeometry Geometry
|
||||
* collection.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeometry, feature) {};
|
||||
|
||||
@@ -64,7 +64,7 @@ VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeom
|
||||
/**
|
||||
* @param {module:ol/geom/LineString~LineString|ol.render.Feature} lineStringGeometry Line
|
||||
* string geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {};
|
||||
|
||||
@@ -72,7 +72,7 @@ VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {
|
||||
/**
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} multiLineStringGeometry
|
||||
* MultiLineString geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {};
|
||||
|
||||
@@ -80,21 +80,21 @@ VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry,
|
||||
/**
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
|
||||
* geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Point~Point|ol.render.Feature} pointGeometry Point geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};
|
||||
|
||||
@@ -102,14 +102,14 @@ VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};
|
||||
/**
|
||||
* @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} polygonGeometry Polygon
|
||||
* geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawText = function(geometry, feature) {};
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
|
||||
* this method is called. If you need `zIndex` support, you should be using an
|
||||
* {@link ol.layer.Vector} instead.
|
||||
*
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @override
|
||||
* @api
|
||||
|
||||
@@ -449,7 +449,7 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
|
||||
/**
|
||||
* @protected
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.beginGeometry = function(geometry, feature) {
|
||||
this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];
|
||||
@@ -496,7 +496,7 @@ CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) {
|
||||
|
||||
/**
|
||||
* @param {ol.DeclutterGroup} declutterGroup Declutter group.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
|
||||
if (declutterGroup && declutterGroup.length > 5) {
|
||||
@@ -538,7 +538,7 @@ CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Array.<*>} instructions Instructions array.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined}
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined}
|
||||
* featureCallback Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
@@ -584,14 +584,14 @@ CanvasReplay.prototype.replay_ = function(
|
||||
// When the batch size gets too big, performance decreases. 200 is a good
|
||||
// balance between batch size and number of fill/stroke instructions.
|
||||
const batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;
|
||||
let /** @type {ol.Feature|ol.render.Feature} */ feature;
|
||||
let /** @type {module:ol/Feature~Feature|ol.render.Feature} */ feature;
|
||||
let x, y;
|
||||
while (i < ii) {
|
||||
const instruction = instructions[i];
|
||||
const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
|
||||
switch (type) {
|
||||
case CanvasInstruction.BEGIN_GEOMETRY:
|
||||
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
|
||||
feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
|
||||
if ((skipFeatures &&
|
||||
skippedFeaturesHash[getUid(feature).toString()]) ||
|
||||
!feature.getGeometry()) {
|
||||
@@ -760,7 +760,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
break;
|
||||
case CanvasInstruction.END_GEOMETRY:
|
||||
if (featureCallback !== undefined) {
|
||||
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
|
||||
feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
|
||||
const result = featureCallback(feature);
|
||||
if (result) {
|
||||
return result;
|
||||
@@ -870,7 +870,7 @@ CanvasReplay.prototype.replay = function(
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T=} opt_featureCallback
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T=} opt_featureCallback
|
||||
* Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
@@ -1054,7 +1054,7 @@ CanvasReplay.prototype.updateStrokeStyle = function(state, applyStroke) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.endGeometry = function(geometry, feature) {
|
||||
this.beginGeometryInstruction1_[2] = this.instructions.length;
|
||||
|
||||
@@ -288,7 +288,7 @@ CanvasReplayGroup.prototype.finish = function() {
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T} callback Feature
|
||||
* callback.
|
||||
* @param {Object.<string, ol.DeclutterGroup>} declutterReplays Declutter
|
||||
* replays.
|
||||
@@ -335,7 +335,7 @@ CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
let replayType;
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function featureCallback(feature) {
|
||||
|
||||
@@ -396,7 +396,7 @@ WebGLLineStringReplay.prototype.drawPolygonCoordinates = function(
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {number=} opt_index Index count.
|
||||
*/
|
||||
WebGLLineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) {
|
||||
|
||||
@@ -95,7 +95,7 @@ const WebGLReplay = function(tolerance, maxExtent) {
|
||||
/**
|
||||
* Start index per feature (the feature).
|
||||
* @protected
|
||||
* @type {Array.<ol.Feature|ol.render.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature|ol.render.Feature>}
|
||||
*/
|
||||
this.startIndicesFeature = [];
|
||||
|
||||
@@ -184,7 +184,7 @@ WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hi
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -199,7 +199,7 @@ WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, ski
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
@@ -226,7 +226,7 @@ WebGLReplay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeat
|
||||
* @param {ol.webgl.Context} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -254,7 +254,7 @@ WebGLReplay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedF
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
|
||||
@@ -195,7 +195,7 @@ WebGLReplayGroup.prototype.replay = function(context,
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
@@ -241,7 +241,7 @@ WebGLReplayGroup.prototype.replayHitDetection_ = function(context,
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T|undefined} callback Feature callback.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} callback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -268,7 +268,7 @@ WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
coordinate, resolution, rotation, HIT_DETECTION_SIZE,
|
||||
pixelRatio, opacity, skippedFeaturesHash,
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -309,7 +309,7 @@ WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function(
|
||||
coordinate, resolution, rotation, HIT_DETECTION_SIZE,
|
||||
pixelRatio, opacity, skippedFeaturesHash,
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {boolean} Is there a feature?
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -36,7 +36,7 @@ inherits(LayerRenderer, Observable);
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {olx.FrameState} frameState Frame state.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: S, (ol.Feature|ol.render.Feature), ol.layer.Layer): T}
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), ol.layer.Layer): T}
|
||||
* callback Feature callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @return {T|undefined} Callback result.
|
||||
|
||||
@@ -90,7 +90,7 @@ function expireIconCache(map, frameState) {
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {olx.FrameState} frameState FrameState.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: S, (ol.Feature|ol.render.Feature),
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature),
|
||||
* ol.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
|
||||
@@ -108,7 +108,7 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
|
||||
const viewResolution = viewState.resolution;
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.layer.Layer} layer Layer.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
|
||||
@@ -107,7 +107,7 @@ IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate = function(coord
|
||||
return source.forEachFeatureAtCoordinate(
|
||||
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -58,7 +58,7 @@ const CanvasVectorLayerRenderer = function(vectorLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {function(ol.Feature, ol.Feature): number|null}
|
||||
* @type {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null}
|
||||
*/
|
||||
this.renderedRenderOrder_ = null;
|
||||
|
||||
@@ -257,7 +257,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
|
||||
const features = {};
|
||||
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -358,7 +358,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());
|
||||
vectorSource.loadFeatures(extent, resolution, projection);
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @this {ol.renderer.canvas.VectorLayer}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -374,11 +374,11 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
}
|
||||
}.bind(this);
|
||||
if (vectorLayerRenderOrder) {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
vectorSource.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function(feature) {
|
||||
features.push(feature);
|
||||
@@ -404,7 +404,7 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
|
||||
|
||||
@@ -197,7 +197,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
|
||||
const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @this {ol.renderer.canvas.VectorTileLayer}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -292,7 +292,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
|
||||
found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -446,7 +446,7 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
|
||||
* styles.
|
||||
|
||||
@@ -33,8 +33,8 @@ const GEOMETRY_RENDERERS = {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature1 Feature 1.
|
||||
* @param {ol.Feature|ol.render.Feature} feature2 Feature 2.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature1 Feature 1.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature2 Feature 2.
|
||||
* @return {number} Order.
|
||||
*/
|
||||
export function defaultOrder(feature1, feature2) {
|
||||
@@ -67,7 +67,7 @@ export function getTolerance(resolution, pixelRatio) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function renderCircleGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
@@ -88,7 +88,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @param {function(this: T, ol.events.Event)} listener Listener function.
|
||||
@@ -120,7 +120,7 @@ export function renderFeature(replayGroup, feature, style, squaredTolerance, lis
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
*/
|
||||
@@ -144,7 +144,7 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderGeometry(replayGroup, geometry, style, feature) {
|
||||
if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
|
||||
@@ -163,7 +163,7 @@ function renderGeometry(replayGroup, geometry, style, feature) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {
|
||||
const geometries = geometry.getGeometriesArray();
|
||||
@@ -180,7 +180,7 @@ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature)
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
const strokeStyle = style.getStroke();
|
||||
@@ -202,7 +202,7 @@ function renderLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
const strokeStyle = style.getStroke();
|
||||
@@ -224,7 +224,7 @@ function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
@@ -247,7 +247,7 @@ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderPointGeometry(replayGroup, geometry, style, feature) {
|
||||
const imageStyle = style.getImage();
|
||||
@@ -272,7 +272,7 @@ function renderPointGeometry(replayGroup, geometry, style, feature) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
|
||||
const imageStyle = style.getImage();
|
||||
@@ -297,7 +297,7 @@ function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Geometry.
|
||||
* @param {ol.style.Style} style Style.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
*/
|
||||
function renderPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
|
||||
@@ -116,7 +116,7 @@ WebGLImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordina
|
||||
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -48,7 +48,7 @@ const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {function(ol.Feature, ol.Feature): number|null}
|
||||
* @type {function(module:ol/Feature~Feature, module:ol/Feature~Feature): number|null}
|
||||
*/
|
||||
this.renderedRenderOrder_ = null;
|
||||
|
||||
@@ -150,7 +150,7 @@ WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordin
|
||||
frameState.size, frameState.pixelRatio, layerState.opacity,
|
||||
{},
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -261,7 +261,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
|
||||
extent, vectorLayer.getRenderBuffer());
|
||||
vectorSource.loadFeatures(extent, resolution, projection);
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @this {ol.renderer.webgl.VectorLayer}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -277,11 +277,11 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
|
||||
}
|
||||
};
|
||||
if (vectorLayerRenderOrder) {
|
||||
/** @type {Array.<ol.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature>} */
|
||||
const features = [];
|
||||
vectorSource.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function(feature) {
|
||||
features.push(feature);
|
||||
@@ -304,7 +304,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
|
||||
|
||||
@@ -44,13 +44,13 @@ const Cluster = function(options) {
|
||||
this.distance = options.distance !== undefined ? options.distance : 20;
|
||||
|
||||
/**
|
||||
* @type {Array.<ol.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature>}
|
||||
* @protected
|
||||
*/
|
||||
this.features = [];
|
||||
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @return {module:ol/geom/Point~Point} Cluster calculation point.
|
||||
* @protected
|
||||
*/
|
||||
@@ -174,8 +174,8 @@ Cluster.prototype.cluster = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array.<ol.Feature>} features Features
|
||||
* @return {ol.Feature} The cluster feature.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features
|
||||
* @return {module:ol/Feature~Feature} The cluster feature.
|
||||
* @protected
|
||||
*/
|
||||
Cluster.prototype.createCluster = function(features) {
|
||||
|
||||
@@ -85,7 +85,7 @@ Source.prototype.adaptAttributions_ = function(attributionLike) {
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T} callback Feature
|
||||
* callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
|
||||
@@ -31,7 +31,7 @@ import RBush from '../structs/RBush.js';
|
||||
* @extends {ol.events.Event}
|
||||
* @implements {oli.source.Vector.Event}
|
||||
* @param {string} type Type.
|
||||
* @param {ol.Feature=} opt_feature Feature.
|
||||
* @param {module:ol/Feature~Feature=} opt_feature Feature.
|
||||
*/
|
||||
export const VectorSourceEvent = function(type, opt_feature) {
|
||||
|
||||
@@ -39,7 +39,7 @@ export const VectorSourceEvent = function(type, opt_feature) {
|
||||
|
||||
/**
|
||||
* The feature being added or removed.
|
||||
* @type {ol.Feature|undefined}
|
||||
* @type {module:ol/Feature~Feature|undefined}
|
||||
* @api
|
||||
*/
|
||||
this.feature = opt_feature;
|
||||
@@ -114,7 +114,7 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.structs.RBush.<ol.Feature>}
|
||||
* @type {ol.structs.RBush.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
this.featuresRtree_ = useSpatialIndex ? new RBush() : null;
|
||||
|
||||
@@ -126,21 +126,21 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string, ol.Feature>}
|
||||
* @type {!Object.<string, module:ol/Feature~Feature>}
|
||||
*/
|
||||
this.nullGeometryFeatures_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features by id (the return from feature.getId()).
|
||||
* @private
|
||||
* @type {!Object.<string, ol.Feature>}
|
||||
* @type {!Object.<string, module:ol/Feature~Feature>}
|
||||
*/
|
||||
this.idIndex_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features without id (keyed by ol.getUid(feature)).
|
||||
* @private
|
||||
* @type {!Object.<string, ol.Feature>}
|
||||
* @type {!Object.<string, module:ol/Feature~Feature>}
|
||||
*/
|
||||
this.undefIdIndex_ = {};
|
||||
|
||||
@@ -152,7 +152,7 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Collection.<ol.Feature>}
|
||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
||||
*/
|
||||
this.featuresCollection_ = null;
|
||||
|
||||
@@ -184,7 +184,7 @@ inherits(VectorSource, Source);
|
||||
* instead. A feature will not be added to the source if feature with
|
||||
* the same id is already there. The reason for this behavior is to avoid
|
||||
* feature duplication when using bbox or tile loading strategies.
|
||||
* @param {ol.Feature} feature Feature to add.
|
||||
* @param {module:ol/Feature~Feature} feature Feature to add.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.addFeature = function(feature) {
|
||||
@@ -195,7 +195,7 @@ VectorSource.prototype.addFeature = function(feature) {
|
||||
|
||||
/**
|
||||
* Add a feature without firing a `change` event.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @protected
|
||||
*/
|
||||
VectorSource.prototype.addFeatureInternal = function(feature) {
|
||||
@@ -224,7 +224,7 @@ VectorSource.prototype.addFeatureInternal = function(feature) {
|
||||
|
||||
/**
|
||||
* @param {string} featureKey Unique identifier for the feature.
|
||||
* @param {ol.Feature} feature The feature.
|
||||
* @param {module:ol/Feature~Feature} feature The feature.
|
||||
* @private
|
||||
*/
|
||||
VectorSource.prototype.setupChangeEvents_ = function(featureKey, feature) {
|
||||
@@ -239,7 +239,7 @@ VectorSource.prototype.setupChangeEvents_ = function(featureKey, feature) {
|
||||
|
||||
/**
|
||||
* @param {string} featureKey Unique identifier for the feature.
|
||||
* @param {ol.Feature} feature The feature.
|
||||
* @param {module:ol/Feature~Feature} feature The feature.
|
||||
* @return {boolean} The feature is "valid", in the sense that it is also a
|
||||
* candidate for insertion into the Rtree.
|
||||
* @private
|
||||
@@ -264,7 +264,7 @@ VectorSource.prototype.addToIndex_ = function(featureKey, feature) {
|
||||
|
||||
/**
|
||||
* Add a batch of features to the source.
|
||||
* @param {Array.<ol.Feature>} features Features to add.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features to add.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.addFeatures = function(features) {
|
||||
@@ -275,7 +275,7 @@ VectorSource.prototype.addFeatures = function(features) {
|
||||
|
||||
/**
|
||||
* Add features without firing a `change` event.
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {Array.<module:ol/Feature~Feature>} features Features.
|
||||
* @protected
|
||||
*/
|
||||
VectorSource.prototype.addFeaturesInternal = function(features) {
|
||||
@@ -316,7 +316,7 @@ VectorSource.prototype.addFeaturesInternal = function(features) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {!ol.Collection.<ol.Feature>} collection Collection.
|
||||
* @param {!ol.Collection.<module:ol/Feature~Feature>} collection Collection.
|
||||
* @private
|
||||
*/
|
||||
VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||
@@ -341,7 +341,7 @@ VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||
function(evt) {
|
||||
if (!modifyingCollection) {
|
||||
modifyingCollection = true;
|
||||
this.addFeature(/** @type {ol.Feature} */ (evt.element));
|
||||
this.addFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
modifyingCollection = false;
|
||||
}
|
||||
}, this);
|
||||
@@ -349,7 +349,7 @@ VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||
function(evt) {
|
||||
if (!modifyingCollection) {
|
||||
modifyingCollection = true;
|
||||
this.removeFeature(/** @type {ol.Feature} */ (evt.element));
|
||||
this.removeFeature(/** @type {module:ol/Feature~Feature} */ (evt.element));
|
||||
modifyingCollection = false;
|
||||
}
|
||||
}, this);
|
||||
@@ -402,7 +402,7 @@ VectorSource.prototype.clear = function(opt_fast) {
|
||||
* with each one. If the callback returns any "truthy" value, iteration will
|
||||
* stop and the function will return the same value.
|
||||
*
|
||||
* @param {function(ol.Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* on the source. Return a truthy value to stop iteration.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -424,7 +424,7 @@ VectorSource.prototype.forEachFeature = function(callback) {
|
||||
* value.
|
||||
*
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {function(ol.Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* whose goemetry contains the provided coordinate.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -456,7 +456,7 @@ VectorSource.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, c
|
||||
* features, equivalent to {@link ol.source.Vector#forEachFeature}.
|
||||
*
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {function(ol.Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* whose bounding box intersects the provided extent.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -481,7 +481,7 @@ VectorSource.prototype.forEachFeatureInExtent = function(extent, callback) {
|
||||
* source.forEachFeatureInExtent()} method instead.
|
||||
*
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {function(ol.Feature): T} callback Called with each feature
|
||||
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
|
||||
* whose geometry intersects the provided extent.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
@@ -490,7 +490,7 @@ VectorSource.prototype.forEachFeatureInExtent = function(extent, callback) {
|
||||
VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callback) {
|
||||
return this.forEachFeatureInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @return {T|undefined} The return value from the last call to the callback.
|
||||
* @template T
|
||||
*/
|
||||
@@ -510,7 +510,7 @@ VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callb
|
||||
* Get the features collection associated with this source. Will be `null`
|
||||
* unless the source was configured with `useSpatialIndex` set to `false`, or
|
||||
* with an {@link ol.Collection} as `features`.
|
||||
* @return {ol.Collection.<ol.Feature>} The collection of features.
|
||||
* @return {ol.Collection.<module:ol/Feature~Feature>} The collection of features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeaturesCollection = function() {
|
||||
@@ -520,7 +520,7 @@ VectorSource.prototype.getFeaturesCollection = function() {
|
||||
|
||||
/**
|
||||
* Get all features on the source in random order.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeatures = function() {
|
||||
@@ -533,14 +533,14 @@ VectorSource.prototype.getFeatures = function() {
|
||||
extend(features, getValues(this.nullGeometryFeatures_));
|
||||
}
|
||||
}
|
||||
return /** @type {Array.<ol.Feature>} */ (features);
|
||||
return /** @type {Array.<module:ol/Feature~Feature>} */ (features);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get all features whose geometry intersects the provided coordinate.
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeaturesAtCoordinate = function(coordinate) {
|
||||
@@ -560,7 +560,7 @@ VectorSource.prototype.getFeaturesAtCoordinate = function(coordinate) {
|
||||
* This method is not available when the source is configured with
|
||||
* `useSpatialIndex` set to `false`.
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @return {Array.<ol.Feature>} Features.
|
||||
* @return {Array.<module:ol/Feature~Feature>} Features.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeaturesInExtent = function(extent) {
|
||||
@@ -574,10 +574,10 @@ VectorSource.prototype.getFeaturesInExtent = function(extent) {
|
||||
* This method is not available when the source is configured with
|
||||
* `useSpatialIndex` set to `false`.
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {function(ol.Feature):boolean=} opt_filter Feature filter function.
|
||||
* The filter function will receive one argument, the {@link ol.Feature feature}
|
||||
* @param {function(module:ol/Feature~Feature):boolean=} opt_filter Feature filter function.
|
||||
* The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}
|
||||
* and it should return a boolean value. By default, no filtering is made.
|
||||
* @return {ol.Feature} Closest feature.
|
||||
* @return {module:ol/Feature~Feature} Closest feature.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getClosestFeatureToCoordinate = function(coordinate, opt_filter) {
|
||||
@@ -597,7 +597,7 @@ VectorSource.prototype.getClosestFeatureToCoordinate = function(coordinate, opt_
|
||||
const filter = opt_filter ? opt_filter : TRUE;
|
||||
this.featuresRtree_.forEachInExtent(extent,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
*/
|
||||
function(feature) {
|
||||
if (filter(feature)) {
|
||||
@@ -644,7 +644,7 @@ VectorSource.prototype.getExtent = function(opt_extent) {
|
||||
* `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.
|
||||
*
|
||||
* @param {string|number} id Feature identifier.
|
||||
* @return {ol.Feature} The feature (or `null` if not found).
|
||||
* @return {module:ol/Feature~Feature} The feature (or `null` if not found).
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.getFeatureById = function(id) {
|
||||
@@ -694,7 +694,7 @@ VectorSource.prototype.getUrl = function() {
|
||||
* @private
|
||||
*/
|
||||
VectorSource.prototype.handleFeatureChange_ = function(event) {
|
||||
const feature = /** @type {ol.Feature} */ (event.target);
|
||||
const feature = /** @type {module:ol/Feature~Feature} */ (event.target);
|
||||
const featureKey = getUid(feature).toString();
|
||||
const geometry = feature.getGeometry();
|
||||
if (!geometry) {
|
||||
@@ -799,7 +799,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
|
||||
* instead.
|
||||
* @param {ol.Feature} feature Feature to remove.
|
||||
* @param {module:ol/Feature~Feature} feature Feature to remove.
|
||||
* @api
|
||||
*/
|
||||
VectorSource.prototype.removeFeature = function(feature) {
|
||||
@@ -818,7 +818,7 @@ VectorSource.prototype.removeFeature = function(feature) {
|
||||
|
||||
/**
|
||||
* Remove feature without firing a `change` event.
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @protected
|
||||
*/
|
||||
VectorSource.prototype.removeFeatureInternal = function(feature) {
|
||||
@@ -839,7 +839,7 @@ VectorSource.prototype.removeFeatureInternal = function(feature) {
|
||||
/**
|
||||
* Remove a feature from the id index. Called internally when the feature id
|
||||
* may have changed.
|
||||
* @param {ol.Feature} feature The feature.
|
||||
* @param {module:ol/Feature~Feature} feature The feature.
|
||||
* @return {boolean} Removed the feature from the index.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -310,7 +310,7 @@ let defaultStyles = null;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {Array.<ol.style.Style>} Style.
|
||||
*/
|
||||
@@ -417,7 +417,7 @@ export function createEditingStyle() {
|
||||
|
||||
/**
|
||||
* Function that is called with a feature and returns its default geometry.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature to get the geometry
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature to get the geometry
|
||||
* for.
|
||||
* @return {module:ol/geom/Geometry~Geometry|ol.render.Feature|undefined} Geometry to render.
|
||||
*/
|
||||
|
||||
@@ -232,7 +232,7 @@ ol.LRUCacheEntry;
|
||||
|
||||
/**
|
||||
* @typedef {{depth: (Array.<number>|undefined),
|
||||
* feature: ol.Feature,
|
||||
* feature: module:ol/Feature~Feature,
|
||||
* geometry: module:ol/geom/SimpleGeometry~SimpleGeometry,
|
||||
* index: (number),
|
||||
* segment: Array.<module:ol/extent~Extent>,
|
||||
@@ -307,10 +307,10 @@ ol.ReprojTriangle;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.Feature} or {@link ol.render.Feature} and
|
||||
* A function that takes an {@link module:ol/Feature~Feature} or {@link ol.render.Feature} and
|
||||
* an {@link ol.layer.Layer} and returns `true` if the feature may be selected
|
||||
* or `false` otherwise.
|
||||
* @typedef {function((ol.Feature|ol.render.Feature), ol.layer.Layer):
|
||||
* @typedef {function((module:ol/Feature~Feature|ol.render.Feature), ol.layer.Layer):
|
||||
* boolean}
|
||||
*/
|
||||
ol.SelectFilterFunction;
|
||||
@@ -328,7 +328,7 @@ ol.SnapResultType;
|
||||
|
||||
/**
|
||||
* @typedef {{
|
||||
* feature: ol.Feature,
|
||||
* feature: module:ol/Feature~Feature,
|
||||
* segment: Array.<module:ol/coordinate~Coordinate>
|
||||
* }}
|
||||
*/
|
||||
@@ -397,10 +397,10 @@ ol.SourceUrlTileOptions;
|
||||
|
||||
|
||||
/**
|
||||
* A function that takes an {@link ol.Feature} as argument and returns an
|
||||
* A function that takes an {@link module:ol/Feature~Feature} as argument and returns an
|
||||
* {@link module:ol/geom/Geometry~Geometry} that will be rendered and styled for the feature.
|
||||
*
|
||||
* @typedef {function((ol.Feature|ol.render.Feature)):
|
||||
* @typedef {function((module:ol/Feature~Feature|ol.render.Feature)):
|
||||
* (module:ol/geom/Geometry~Geometry|ol.render.Feature|undefined)}
|
||||
*/
|
||||
ol.StyleGeometryFunction;
|
||||
|
||||
Reference in New Issue
Block a user