Move ReadOptions to ol/format/Feature
This commit is contained in:
@@ -5,45 +5,6 @@
|
|||||||
let olx;
|
let olx;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{dataProjection: ol.ProjectionLike,
|
|
||||||
* extent: (ol.Extent|undefined),
|
|
||||||
* featureProjection: ol.ProjectionLike,
|
|
||||||
* rightHanded: (boolean|undefined)}}
|
|
||||||
*/
|
|
||||||
olx.format.ReadOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Projection of the data we are reading. If not provided, the projection will
|
|
||||||
* be derived from the data (where possible) or the `defaultDataProjection` of
|
|
||||||
* the format is assigned (where set). If the projection can not be derived from
|
|
||||||
* the data and if no `defaultDataProjection` is set for a format, the features
|
|
||||||
* will not be reprojected.
|
|
||||||
* @type {ol.ProjectionLike}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.format.ReadOptions.prototype.dataProjection;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tile extent of the tile being read. This is only used and required for
|
|
||||||
* {@link ol.format.MVT}.
|
|
||||||
* @type {ol.Extent}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.format.ReadOptions.prototype.extent;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Projection of the feature geometries created by the format reader. If not
|
|
||||||
* provided, features will be returned in the `dataProjection`.
|
|
||||||
* @type {ol.ProjectionLike}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.format.ReadOptions.prototype.featureProjection;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{dataProjection: ol.ProjectionLike,
|
* @typedef {{dataProjection: ol.ProjectionLike,
|
||||||
* featureProjection: ol.ProjectionLike,
|
* featureProjection: ol.ProjectionLike,
|
||||||
|
|||||||
@@ -1,18 +1,4 @@
|
|||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} format_ReadOptions
|
|
||||||
* @property {ol.ProjectionLike} dataProjection Projection of the data we are reading. If not provided, the projection will
|
|
||||||
* be derived from the data (where possible) or the `defaultDataProjection` of
|
|
||||||
* the format is assigned (where set). If the projection can not be derived from
|
|
||||||
* the data and if no `defaultDataProjection` is set for a format, the features
|
|
||||||
* will not be reprojected.
|
|
||||||
* @property {ol.Extent} extent Tile extent of the tile being read. This is only used and required for
|
|
||||||
* {@link ol.format.MVT}.
|
|
||||||
* @property {ol.ProjectionLike} featureProjection Projection of the feature geometries created by the format reader. If not
|
|
||||||
* provided, features will be returned in the `dataProjection`.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} format_WriteOptions
|
* @typedef {Object} format_WriteOptions
|
||||||
* @property {ol.ProjectionLike} dataProjection Projection of the data we are writing. If not provided, the
|
* @property {ol.ProjectionLike} dataProjection Projection of the data we are writing. If not provided, the
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ inherits(EsriJSON, JSONFeature);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {EsriJSONGeometry} object Object.
|
* @param {EsriJSONGeometry} object Object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
function readGeometry(object, opt_options) {
|
function readGeometry(object, opt_options) {
|
||||||
@@ -405,7 +405,7 @@ function writeMultiPolygonGeometry(geometry, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -418,7 +418,7 @@ EsriJSON.prototype.readFeature;
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -474,7 +474,7 @@ EsriJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
* @param {ArrayBuffer|Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,6 +5,22 @@ import Geometry from '../geom/Geometry.js';
|
|||||||
import {assign} from '../obj.js';
|
import {assign} from '../obj.js';
|
||||||
import {get as getProjection, equivalent as equivalentProjection, transformExtent} from '../proj.js';
|
import {get as getProjection, equivalent as equivalentProjection, transformExtent} from '../proj.js';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} ReadOptions
|
||||||
|
* @property {ol.ProjectionLike} dataProjection Projection of the data we are reading.
|
||||||
|
* If not provided, the projection will be derived from the data (where possible) or
|
||||||
|
* the `defaultDataProjection` of the format is assigned (where set). If the projection
|
||||||
|
* can not be derived from the data and if no `defaultDataProjection` is set for a format,
|
||||||
|
* the features will not be reprojected.
|
||||||
|
* @property {ol.Extent} extent Tile extent of the tile being read. This is only used and
|
||||||
|
* required for {@link ol.format.MVT}.
|
||||||
|
* @property {ol.ProjectionLike} featureProjection Projection of the feature geometries
|
||||||
|
* created by the format reader. If not provided, features will be returned in the
|
||||||
|
* `dataProjection`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -38,8 +54,8 @@ const FeatureFormat = function() {
|
|||||||
/**
|
/**
|
||||||
* Adds the data projection to the read options.
|
* Adds the data projection to the read options.
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @return {olx.format.ReadOptions|undefined} Options.
|
* @return {module:ol/format/Feature~ReadOptions|undefined} Options.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
FeatureFormat.prototype.getReadOptions = function(source, opt_options) {
|
FeatureFormat.prototype.getReadOptions = function(source, opt_options) {
|
||||||
@@ -58,10 +74,10 @@ FeatureFormat.prototype.getReadOptions = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* Sets the `defaultDataProjection` on the options, if no `dataProjection`
|
* Sets the `defaultDataProjection` on the options, if no `dataProjection`
|
||||||
* is set.
|
* is set.
|
||||||
* @param {olx.format.WriteOptions|olx.format.ReadOptions|undefined} options
|
* @param {olx.format.WriteOptions|module:ol/format/Feature~ReadOptions|undefined} options
|
||||||
* Options.
|
* Options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {olx.format.WriteOptions|olx.format.ReadOptions|undefined}
|
* @return {olx.format.WriteOptions|module:ol/format/Feature~ReadOptions|undefined}
|
||||||
* Updated options.
|
* Updated options.
|
||||||
*/
|
*/
|
||||||
FeatureFormat.prototype.adaptOptions = function(options) {
|
FeatureFormat.prototype.adaptOptions = function(options) {
|
||||||
@@ -93,7 +109,7 @@ FeatureFormat.prototype.getType = function() {};
|
|||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
||||||
@@ -104,7 +120,7 @@ FeatureFormat.prototype.readFeature = function(source, opt_options) {};
|
|||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
|
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
|
FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
|
||||||
@@ -115,7 +131,7 @@ FeatureFormat.prototype.readFeatures = function(source, opt_options) {};
|
|||||||
*
|
*
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
|
FeatureFormat.prototype.readGeometry = function(source, opt_options) {};
|
||||||
@@ -168,7 +184,7 @@ export default FeatureFormat;
|
|||||||
/**
|
/**
|
||||||
* @param {ol.geom.Geometry|module:ol/extent~Extent} geometry Geometry.
|
* @param {ol.geom.Geometry|module:ol/extent~Extent} geometry Geometry.
|
||||||
* @param {boolean} write Set to true for writing, false for reading.
|
* @param {boolean} write Set to true for writing, false for reading.
|
||||||
* @param {(olx.format.WriteOptions|olx.format.ReadOptions)=} opt_options
|
* @param {(olx.format.WriteOptions|module:ol/format/Feature~ReadOptions)=} opt_options
|
||||||
* Options.
|
* Options.
|
||||||
* @return {ol.geom.Geometry|module:ol/extent~Extent} Transformed geometry.
|
* @return {ol.geom.Geometry|module:ol/extent~Extent} Transformed geometry.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ function parseTrkSeg(node, objectStack) {
|
|||||||
* @return {ol.Feature|undefined} Track.
|
* @return {ol.Feature|undefined} Track.
|
||||||
*/
|
*/
|
||||||
function readRte(node, objectStack) {
|
function readRte(node, objectStack) {
|
||||||
const options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||||
const values = pushParseAndPop({
|
const values = pushParseAndPop({
|
||||||
'flatCoordinates': [],
|
'flatCoordinates': [],
|
||||||
'layoutOptions': {}
|
'layoutOptions': {}
|
||||||
@@ -551,7 +551,7 @@ function readRte(node, objectStack) {
|
|||||||
* @return {ol.Feature|undefined} Track.
|
* @return {ol.Feature|undefined} Track.
|
||||||
*/
|
*/
|
||||||
function readTrk(node, objectStack) {
|
function readTrk(node, objectStack) {
|
||||||
const options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||||
const values = pushParseAndPop({
|
const values = pushParseAndPop({
|
||||||
'flatCoordinates': [],
|
'flatCoordinates': [],
|
||||||
'ends': [],
|
'ends': [],
|
||||||
@@ -583,7 +583,7 @@ function readTrk(node, objectStack) {
|
|||||||
* @return {ol.Feature|undefined} Waypoint.
|
* @return {ol.Feature|undefined} Waypoint.
|
||||||
*/
|
*/
|
||||||
function readWpt(node, objectStack) {
|
function readWpt(node, objectStack) {
|
||||||
const options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||||
const values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);
|
const values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);
|
||||||
if (!values) {
|
if (!values) {
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -625,7 +625,7 @@ GPX.prototype.handleReadExtensions_ = function(features) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -659,7 +659,7 @@ GPX.prototype.readFeatureFromNode = function(node, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ const GEOMETRY_WRITERS = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
|
* @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
function readGeometry(object, opt_options) {
|
function readGeometry(object, opt_options) {
|
||||||
@@ -114,7 +114,7 @@ function readGeometry(object, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {GeoJSONGeometryCollection} object Object.
|
* @param {GeoJSONGeometryCollection} object Object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.GeometryCollection} Geometry collection.
|
* @return {ol.geom.GeometryCollection} Geometry collection.
|
||||||
*/
|
*/
|
||||||
function readGeometryCollectionGeometry(object, opt_options) {
|
function readGeometryCollectionGeometry(object, opt_options) {
|
||||||
@@ -320,7 +320,7 @@ function writePolygonGeometry(geometry, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -334,7 +334,7 @@ GeoJSON.prototype.readFeature;
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -402,7 +402,7 @@ GeoJSON.prototype.readFeaturesFromObject = function(object, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ const NEWLINE_RE = /\r\n|\r|\n/;
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -175,7 +175,7 @@ IGC.prototype.readFeatureFromText = function(text, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ JSONFeature.prototype.readFeatures = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Object} object Object.
|
* @param {Object} object Object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +77,7 @@ JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Object} object Object.
|
* @param {Object} object Object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
@@ -96,7 +96,7 @@ JSONFeature.prototype.readGeometry = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Object} object Object.
|
* @param {Object} object Object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1678,7 +1678,7 @@ KML.prototype.readPlacemark_ = function(node, objectStack) {
|
|||||||
if (id !== null) {
|
if (id !== null) {
|
||||||
feature.setId(id);
|
feature.setId(id);
|
||||||
}
|
}
|
||||||
const options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||||
|
|
||||||
const geometry = object['geometry'];
|
const geometry = object['geometry'];
|
||||||
if (geometry) {
|
if (geometry) {
|
||||||
@@ -1768,7 +1768,7 @@ KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -1799,7 +1799,7 @@ KML.prototype.readFeatureFromNode = function(node, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ function getGeometryType(type, numEnds) {
|
|||||||
* @private
|
* @private
|
||||||
* @param {ol.ext.PBF} pbf PBF
|
* @param {ol.ext.PBF} pbf PBF
|
||||||
* @param {Object} rawFeature Raw Mapbox feature.
|
* @param {Object} rawFeature Raw Mapbox feature.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature|ol.render.Feature} Feature.
|
* @return {ol.Feature|ol.render.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
|
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const NODE_PARSERS = makeStructureNS(
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
*/
|
*/
|
||||||
function readNode(node, objectStack) {
|
function readNode(node, objectStack) {
|
||||||
const options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
|
const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]);
|
||||||
const state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
const state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
||||||
const id = node.getAttribute('id');
|
const id = node.getAttribute('id');
|
||||||
/** @type {module:ol/coordinate~Coordinate} */
|
/** @type {module:ol/coordinate~Coordinate} */
|
||||||
@@ -145,7 +145,7 @@ function readTag(node, objectStack) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ export function encodeUnsignedInteger(num) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -284,7 +284,7 @@ Polyline.prototype.readFeatureFromText = function(text, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -305,7 +305,7 @@ Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ TextFeature.prototype.readFeature = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {string} text Text.
|
* @param {string} text Text.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
@@ -72,7 +72,7 @@ TextFeature.prototype.readFeatures = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {string} text Text.
|
* @param {string} text Text.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
@@ -90,7 +90,7 @@ TextFeature.prototype.readGeometry = function(source, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {string} text Text.
|
* @param {string} text Text.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ function readMultiPolygonGeometry(object, arcs) {
|
|||||||
* @param {string|undefined} property Property to set the `GeometryCollection`'s parent
|
* @param {string|undefined} property Property to set the `GeometryCollection`'s parent
|
||||||
* object to.
|
* object to.
|
||||||
* @param {string} name Name of the `Topology`'s child object.
|
* @param {string} name Name of the `Topology`'s child object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Array of features.
|
* @return {Array.<ol.Feature>} Array of features.
|
||||||
*/
|
*/
|
||||||
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
|
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
|
||||||
@@ -240,7 +240,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
|
|||||||
* @param {string|undefined} property Property to set the `GeometryCollection`'s parent
|
* @param {string|undefined} property Property to set the `GeometryCollection`'s parent
|
||||||
* object to.
|
* object to.
|
||||||
* @param {string} name Name of the `Topology`'s child object.
|
* @param {string} name Name of the `Topology`'s child object.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
|
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ WFS.prototype.setFeatureType = function(featureType) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -718,7 +718,7 @@ WKT.prototype.parse_ = function(wkt) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -744,7 +744,7 @@ WKT.prototype.readFeatureFromText = function(text, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -779,7 +779,7 @@ WKT.prototype.readFeaturesFromText = function(text, opt_options) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Read options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
|||||||
*
|
*
|
||||||
* @function
|
* @function
|
||||||
* @param {Document|Node|Object|string} source Source.
|
* @param {Document|Node|Object|string} source Source.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ XMLFeature.prototype.readFeature = function(source, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Document} doc Document.
|
* @param {Document} doc Document.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
||||||
@@ -73,7 +73,7 @@ XMLFeature.prototype.readFeatureFromDocument = function(doc, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Node} node Node.
|
* @param {Node} node Node.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @return {ol.Feature} Feature.
|
* @return {ol.Feature} Feature.
|
||||||
*/
|
*/
|
||||||
XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
|
XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||||
@@ -101,7 +101,7 @@ XMLFeature.prototype.readFeatures = function(source, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Document} doc Document.
|
* @param {Document} doc Document.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
@@ -120,7 +120,7 @@ XMLFeature.prototype.readFeaturesFromDocument = function(doc, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {Node} node Node.
|
* @param {Node} node Node.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
@@ -147,7 +147,7 @@ XMLFeature.prototype.readGeometry = function(source, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Document} doc Document.
|
* @param {Document} doc Document.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
@@ -158,7 +158,7 @@ XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Node} node Node.
|
* @param {Node} node Node.
|
||||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
* @param {module:ol/format/Feature~ReadOptions=} opt_options Options.
|
||||||
* @protected
|
* @protected
|
||||||
* @return {ol.geom.Geometry} Geometry.
|
* @return {ol.geom.Geometry} Geometry.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ DragAndDrop.prototype.setMap = function(map) {
|
|||||||
/**
|
/**
|
||||||
* @param {ol.format.Feature} format Format.
|
* @param {ol.format.Feature} format Format.
|
||||||
* @param {string} text Text.
|
* @param {string} text Text.
|
||||||
* @param {olx.format.ReadOptions} options Read options.
|
* @param {module:ol/format/Feature~ReadOptions} options Read options.
|
||||||
* @private
|
* @private
|
||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user