diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index 542ad65cf4..6c770c93a9 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -10,8 +10,8 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten * @typedef {Object} ReadOptions * @property {module:ol/proj~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 `dataProjection` of the format is assigned (where set). If the projection + * can not be derived from the data and if no `dataProjection` is set for a format, * the features will not be reprojected. * @property {module:ol/extent~Extent} extent Tile extent of the tile being read. This is only used and * required for {@link module:ol/format/MVT}. @@ -24,8 +24,8 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten /** * @typedef {Object} WriteOptions * @property {module:ol/proj~ProjectionLike} dataProjection Projection of the data we are writing. - * If not provided, the `defaultDataProjection` of the format is assigned (where set). - * If no `defaultDataProjection` is set for a format, the features will be returned + * If not provided, the `dataProjection` of the format is assigned (where set). + * If no `dataProjection` is set for a format, the features will be returned * in the `featureProjection`. * @property {module:ol/proj~ProjectionLike} featureProjection Projection of the feature geometries * that will be serialized by the format writer. If not provided, geometries are assumed @@ -66,7 +66,7 @@ const FeatureFormat = function() { * @protected * @type {module:ol/proj/Projection} */ - this.defaultDataProjection = null; + this.dataProjection = null; /** * @protected @@ -98,7 +98,7 @@ FeatureFormat.prototype.getReadOptions = function(source, opt_options) { /** - * Sets the `defaultDataProjection` on the options, if no `dataProjection` + * Sets the `dataProjection` on the options, if no `dataProjection` * is set. * @param {module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions|undefined} options * Options. @@ -108,7 +108,7 @@ FeatureFormat.prototype.getReadOptions = function(source, opt_options) { */ FeatureFormat.prototype.adaptOptions = function(options) { return assign({ - dataProjection: this.defaultDataProjection, + dataProjection: this.dataProjection, featureProjection: this.defaultFeatureProjection }, options); }; diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index e9e23de5f6..3b4cdb4a85 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -52,7 +52,7 @@ const GPX = function(opt_options) { /** * @inheritDoc */ - this.defaultDataProjection = getProjection('EPSG:4326'); + this.dataProjection = getProjection('EPSG:4326'); /** * @type {function(module:ol/Feature, Node)|undefined} diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 77a789350a..b162ed1988 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -22,7 +22,7 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection. + * @property {module:ol/proj~ProjectionLike} [dataProjection='EPSG:4326'] Default data projection. * @property {module:ol/proj~ProjectionLike} [featureProjection] Projection for features read or * written by the format. Options passed to read or write methods will take precedence. * @property {string} [geometryName] Geometry name to use when creating features. @@ -51,10 +51,9 @@ const GeoJSON = function(opt_options) { /** * @inheritDoc */ - this.defaultDataProjection = getProjection( - options.defaultDataProjection ? - options.defaultDataProjection : 'EPSG:4326'); - + this.dataProjection = getProjection( + options.dataProjection ? + options.dataProjection : 'EPSG:4326'); if (options.featureProjection) { this.defaultFeatureProjection = getProjection(options.featureProjection); @@ -456,7 +455,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) { assert(false, 36); // Unknown SRS type } } else { - projection = this.defaultDataProjection; + projection = this.dataProjection; } return ( /** @type {module:ol/proj/Projection} */ (projection) diff --git a/src/ol/format/IGC.js b/src/ol/format/IGC.js index 0e8eaf6194..b09d8a1bca 100644 --- a/src/ol/format/IGC.js +++ b/src/ol/format/IGC.js @@ -45,7 +45,7 @@ const IGC = function(opt_options) { /** * @inheritDoc */ - this.defaultDataProjection = getProjection('EPSG:4326'); + this.dataProjection = getProjection('EPSG:4326'); /** * @private diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index edfdd1dbf3..c2a70183f0 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -272,7 +272,7 @@ const KML = function(opt_options) { /** * @inheritDoc */ - this.defaultDataProjection = getProjection('EPSG:4326'); + this.dataProjection = getProjection('EPSG:4326'); /** * @private diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index 355102a6c6..057c0fb7bc 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -56,7 +56,7 @@ const MVT = function(opt_options) { /** * @type {module:ol/proj/Projection} */ - this.defaultDataProjection = new Projection({ + this.dataProjection = new Projection({ code: '', units: Units.TILE_PIXELS }); @@ -411,7 +411,7 @@ MVT.prototype.readFeatures = function(source, opt_options) { * @api */ MVT.prototype.readProjection = function(source) { - return this.defaultDataProjection; + return this.dataProjection; }; diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index c0b8ad611e..867abfed0c 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -30,7 +30,7 @@ const OSMXML = function() { /** * @inheritDoc */ - this.defaultDataProjection = getProjection('EPSG:4326'); + this.dataProjection = getProjection('EPSG:4326'); }; inherits(OSMXML, XMLFeature); diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index d45b46cd11..4cf8884b9d 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -41,7 +41,7 @@ const Polyline = function(opt_options) { /** * @inheritDoc */ - this.defaultDataProjection = getProjection('EPSG:4326'); + this.dataProjection = getProjection('EPSG:4326'); /** * @private diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index cbe2914aa9..3b674d0d07 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -111,7 +111,7 @@ TextFeature.prototype.readProjection = function(source) { * @return {module:ol/proj/Projection} Projection. */ TextFeature.prototype.readProjectionFromText = function(text) { - return this.defaultDataProjection; + return this.dataProjection; }; diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 9c5846cbc9..1fe14d9930 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -16,7 +16,7 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection. + * @property {module:ol/proj~ProjectionLike} [dataProjection='EPSG:4326'] Default data projection. * @property {string} [layerName] Set the name of the TopoJSON topology * `objects`'s children as feature property with the specified name. This means * that when set to `'layer'`, a topology like @@ -69,9 +69,9 @@ const TopoJSON = function(opt_options) { /** * @inheritDoc */ - this.defaultDataProjection = getProjection( - options.defaultDataProjection ? - options.defaultDataProjection : 'EPSG:4326'); + this.dataProjection = getProjection( + options.dataProjection ? + options.dataProjection : 'EPSG:4326'); }; @@ -416,7 +416,7 @@ TopoJSON.prototype.readProjection; * @inheritDoc */ TopoJSON.prototype.readProjectionFromObject = function(object) { - return this.defaultDataProjection; + return this.dataProjection; }; diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index 9fbd783501..0267161fd4 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -190,7 +190,7 @@ XMLFeature.prototype.readProjection = function(source) { * @return {module:ol/proj/Projection} Projection. */ XMLFeature.prototype.readProjectionFromDocument = function(doc) { - return this.defaultDataProjection; + return this.dataProjection; }; @@ -200,7 +200,7 @@ XMLFeature.prototype.readProjectionFromDocument = function(doc) { * @return {module:ol/proj/Projection} Projection. */ XMLFeature.prototype.readProjectionFromNode = function(node) { - return this.defaultDataProjection; + return this.dataProjection; }; diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 23ed48266e..8e8f1550a9 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -122,7 +122,7 @@ inherits(VectorSourceEvent, Event); * during parsing. If your remote data source does not advertise its projection * properly, this transformation will be incorrect. For some formats, the * default projection (usually EPSG:4326) can be overridden by setting the - * defaultDataProjection constructor option on the format. + * dataProjection 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. * @property {boolean} [useSpatialIndex=true]