From 96a05fa0ed129f3b5bfad0f009ca3dcfedfc771e Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 17 Dec 2017 01:41:11 -0700 Subject: [PATCH] Rename _ol_format_Feature_ to FeatureFormat --- src/ol/format/EsriJSON.js | 6 +++--- src/ol/format/Feature.js | 28 ++++++++++++++-------------- src/ol/format/GML2.js | 4 ++-- src/ol/format/GML3.js | 4 ++-- src/ol/format/GMLBase.js | 4 ++-- src/ol/format/GPX.js | 14 +++++++------- src/ol/format/GeoJSON.js | 6 +++--- src/ol/format/IGC.js | 4 ++-- src/ol/format/JSONFeature.js | 6 +++--- src/ol/format/KML.js | 6 +++--- src/ol/format/MVT.js | 8 ++++---- src/ol/format/OSMXML.js | 6 +++--- src/ol/format/Polyline.js | 6 +++--- src/ol/format/TextFeature.js | 6 +++--- src/ol/format/TopoJSON.js | 4 ++-- src/ol/format/WKT.js | 6 +++--- src/ol/format/XMLFeature.js | 6 +++--- test/spec/ol/format/topojson.test.js | 4 ++-- 18 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index 5c4e3ee360..598e76b4f2 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -5,7 +5,7 @@ import {inherits} from '../index.js'; import _ol_Feature_ from '../Feature.js'; import _ol_asserts_ from '../asserts.js'; import {containsExtent} from '../extent.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_JSONFeature_ from '../format/JSONFeature.js'; import GeometryLayout from '../geom/GeometryLayout.js'; import GeometryType from '../geom/GeometryType.js'; @@ -84,7 +84,7 @@ EsriJSON.readGeometry_ = function(object, opt_options) { } var geometryReader = EsriJSON.GEOMETRY_READERS_[type]; return ( - /** @type {ol.geom.Geometry} */ _ol_format_Feature_.transformWithOptions( + /** @type {ol.geom.Geometry} */ FeatureFormat.transformWithOptions( geometryReader(object), false, opt_options) ); }; @@ -563,7 +563,7 @@ EsriJSON.prototype.readProjectionFromObject = function(object) { EsriJSON.writeGeometry_ = function(geometry, opt_options) { var geometryWriter = EsriJSON.GEOMETRY_WRITERS_[geometry.getType()]; return geometryWriter(/** @type {ol.geom.Geometry} */( - _ol_format_Feature_.transformWithOptions(geometry, true, opt_options)), + FeatureFormat.transformWithOptions(geometry, true, opt_options)), opt_options); }; diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index baaf9a1f3b..8bdd170b00 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -18,7 +18,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten * @abstract * @api */ -var _ol_format_Feature_ = function() { +var FeatureFormat = function() { /** * @protected @@ -42,7 +42,7 @@ var _ol_format_Feature_ = function() { * @return {olx.format.ReadOptions|undefined} Options. * @protected */ -_ol_format_Feature_.prototype.getReadOptions = function(source, opt_options) { +FeatureFormat.prototype.getReadOptions = function(source, opt_options) { var options; if (opt_options) { options = { @@ -64,7 +64,7 @@ _ol_format_Feature_.prototype.getReadOptions = function(source, opt_options) { * @return {olx.format.WriteOptions|olx.format.ReadOptions|undefined} * Updated options. */ -_ol_format_Feature_.prototype.adaptOptions = function(options) { +FeatureFormat.prototype.adaptOptions = function(options) { return _ol_obj_.assign({ dataProjection: this.defaultDataProjection, featureProjection: this.defaultFeatureProjection @@ -76,7 +76,7 @@ _ol_format_Feature_.prototype.adaptOptions = function(options) { * Get the extent from the source of the last {@link readFeatures} call. * @return {ol.Extent} Tile extent. */ -_ol_format_Feature_.prototype.getLastExtent = function() { +FeatureFormat.prototype.getLastExtent = function() { return null; }; @@ -85,7 +85,7 @@ _ol_format_Feature_.prototype.getLastExtent = function() { * @abstract * @return {ol.format.FormatType} Format. */ -_ol_format_Feature_.prototype.getType = function() {}; +FeatureFormat.prototype.getType = function() {}; /** @@ -96,7 +96,7 @@ _ol_format_Feature_.prototype.getType = function() {}; * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. */ -_ol_format_Feature_.prototype.readFeature = function(source, opt_options) {}; +FeatureFormat.prototype.readFeature = function(source, opt_options) {}; /** @@ -107,7 +107,7 @@ _ol_format_Feature_.prototype.readFeature = function(source, opt_options) {}; * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. */ -_ol_format_Feature_.prototype.readFeatures = function(source, opt_options) {}; +FeatureFormat.prototype.readFeatures = function(source, opt_options) {}; /** @@ -118,7 +118,7 @@ _ol_format_Feature_.prototype.readFeatures = function(source, opt_options) {}; * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.geom.Geometry} Geometry. */ -_ol_format_Feature_.prototype.readGeometry = function(source, opt_options) {}; +FeatureFormat.prototype.readGeometry = function(source, opt_options) {}; /** @@ -128,7 +128,7 @@ _ol_format_Feature_.prototype.readGeometry = function(source, opt_options) {}; * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. */ -_ol_format_Feature_.prototype.readProjection = function(source) {}; +FeatureFormat.prototype.readProjection = function(source) {}; /** @@ -139,7 +139,7 @@ _ol_format_Feature_.prototype.readProjection = function(source) {}; * @param {olx.format.WriteOptions=} opt_options Write options. * @return {string} Result. */ -_ol_format_Feature_.prototype.writeFeature = function(feature, opt_options) {}; +FeatureFormat.prototype.writeFeature = function(feature, opt_options) {}; /** @@ -150,7 +150,7 @@ _ol_format_Feature_.prototype.writeFeature = function(feature, opt_options) {}; * @param {olx.format.WriteOptions=} opt_options Write options. * @return {string} Result. */ -_ol_format_Feature_.prototype.writeFeatures = function(features, opt_options) {}; +FeatureFormat.prototype.writeFeatures = function(features, opt_options) {}; /** @@ -161,7 +161,7 @@ _ol_format_Feature_.prototype.writeFeatures = function(features, opt_options) {} * @param {olx.format.WriteOptions=} opt_options Write options. * @return {string} Result. */ -_ol_format_Feature_.prototype.writeGeometry = function(geometry, opt_options) {}; +FeatureFormat.prototype.writeGeometry = function(geometry, opt_options) {}; /** @@ -172,7 +172,7 @@ _ol_format_Feature_.prototype.writeGeometry = function(geometry, opt_options) {} * @return {ol.geom.Geometry|ol.Extent} Transformed geometry. * @protected */ -_ol_format_Feature_.transformWithOptions = function( +FeatureFormat.transformWithOptions = function( geometry, write, opt_options) { var featureProjection = opt_options ? getProjection(opt_options.featureProjection) : null; @@ -219,4 +219,4 @@ _ol_format_Feature_.transformWithOptions = function( } return transformed; }; -export default _ol_format_Feature_; +export default FeatureFormat; diff --git a/src/ol/format/GML2.js b/src/ol/format/GML2.js index 4d1d7a9aaf..e039acead6 100644 --- a/src/ol/format/GML2.js +++ b/src/ol/format/GML2.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.js'; import {createOrUpdate} from '../extent.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_GMLBase_ from '../format/GMLBase.js'; import _ol_format_XSD_ from '../format/XSD.js'; import Geometry from '../geom/Geometry.js'; @@ -296,7 +296,7 @@ _ol_format_GML2_.prototype.writeGeometryElement = function(node, geometry, objec } } else { value = - _ol_format_Feature_.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context); + FeatureFormat.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context); } _ol_xml_.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ (item), _ol_format_GML2_.GEOMETRY_SERIALIZERS_, diff --git a/src/ol/format/GML3.js b/src/ol/format/GML3.js index d5329f9ad1..d261201929 100644 --- a/src/ol/format/GML3.js +++ b/src/ol/format/GML3.js @@ -4,7 +4,7 @@ import {inherits} from '../index.js'; import _ol_array_ from '../array.js'; import {createOrUpdate} from '../extent.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_GMLBase_ from '../format/GMLBase.js'; import _ol_format_XSD_ from '../format/XSD.js'; import Geometry from '../geom/Geometry.js'; @@ -963,7 +963,7 @@ _ol_format_GML3_.prototype.writeGeometryElement = function(node, geometry, objec } } else { value = - _ol_format_Feature_.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context); + FeatureFormat.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context); } _ol_xml_.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ (item), _ol_format_GML3_.GEOMETRY_SERIALIZERS_, diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index e54cb88a86..7cfffaffbc 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -7,7 +7,7 @@ import {inherits} from '../index.js'; import _ol_array_ from '../array.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_XMLFeature_ from '../format/XMLFeature.js'; import GeometryLayout from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; @@ -205,7 +205,7 @@ _ol_format_GMLBase_.prototype.readGeometryElement = function(node, objectStack) this.GEOMETRY_PARSERS_, node, objectStack, this); if (geometry) { return ( - /** @type {ol.geom.Geometry} */ _ol_format_Feature_.transformWithOptions(geometry, false, context) + /** @type {ol.geom.Geometry} */ FeatureFormat.transformWithOptions(geometry, false, context) ); } else { return undefined; diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index 0f97695965..806b3832ce 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -4,7 +4,7 @@ import {inherits} from '../index.js'; import _ol_Feature_ from '../Feature.js'; import _ol_array_ from '../array.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_XMLFeature_ from '../format/XMLFeature.js'; import _ol_format_XSD_ from '../format/XSD.js'; import GeometryLayout from '../geom/GeometryLayout.js'; @@ -242,7 +242,7 @@ _ol_format_GPX_.readRte_ = function(node, objectStack) { var layout = _ol_format_GPX_.applyLayoutOptions_(layoutOptions, flatCoordinates); var geometry = new LineString(null); geometry.setFlatCoordinates(layout, flatCoordinates); - _ol_format_Feature_.transformWithOptions(geometry, false, options); + FeatureFormat.transformWithOptions(geometry, false, options); var feature = new _ol_Feature_(geometry); feature.setProperties(values); return feature; @@ -275,7 +275,7 @@ _ol_format_GPX_.readTrk_ = function(node, objectStack) { var layout = _ol_format_GPX_.applyLayoutOptions_(layoutOptions, flatCoordinates, ends); var geometry = new MultiLineString(null); geometry.setFlatCoordinates(layout, flatCoordinates, ends); - _ol_format_Feature_.transformWithOptions(geometry, false, options); + FeatureFormat.transformWithOptions(geometry, false, options); var feature = new _ol_Feature_(geometry); feature.setProperties(values); return feature; @@ -299,7 +299,7 @@ _ol_format_GPX_.readWpt_ = function(node, objectStack) { var coordinates = _ol_format_GPX_.appendCoordinate_([], layoutOptions, node, values); var layout = _ol_format_GPX_.applyLayoutOptions_(layoutOptions, coordinates); var geometry = new Point(coordinates, layout); - _ol_format_Feature_.transformWithOptions(geometry, false, options); + FeatureFormat.transformWithOptions(geometry, false, options); var feature = new _ol_Feature_(geometry); feature.setProperties(values); return feature; @@ -630,7 +630,7 @@ _ol_format_GPX_.writeRte_ = function(node, feature, objectStack) { var geometry = feature.getGeometry(); if (geometry) { geometry = /** @type {ol.geom.LineString} */ - (_ol_format_Feature_.transformWithOptions(geometry, true, options)); + (FeatureFormat.transformWithOptions(geometry, true, options)); context['geometryLayout'] = geometry.getLayout(); properties['rtept'] = geometry.getCoordinates(); } @@ -657,7 +657,7 @@ _ol_format_GPX_.writeTrk_ = function(node, feature, objectStack) { var geometry = feature.getGeometry(); if (geometry) { geometry = /** @type {ol.geom.MultiLineString} */ - (_ol_format_Feature_.transformWithOptions(geometry, true, options)); + (FeatureFormat.transformWithOptions(geometry, true, options)); properties['trkseg'] = geometry.getLineStrings(); } var parentNode = objectStack[objectStack.length - 1].node; @@ -698,7 +698,7 @@ _ol_format_GPX_.writeWpt_ = function(node, feature, objectStack) { var geometry = feature.getGeometry(); if (geometry) { geometry = /** @type {ol.geom.Point} */ - (_ol_format_Feature_.transformWithOptions(geometry, true, options)); + (FeatureFormat.transformWithOptions(geometry, true, options)); context['geometryLayout'] = geometry.getLayout(); _ol_format_GPX_.writeWptType_(node, geometry.getCoordinates(), objectStack); } diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 0c4e0ede91..173c115953 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -7,7 +7,7 @@ import {inherits} from '../index.js'; import _ol_asserts_ from '../asserts.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_JSONFeature_ from '../format/JSONFeature.js'; import GeometryCollection from '../geom/GeometryCollection.js'; import LineString from '../geom/LineString.js'; @@ -77,7 +77,7 @@ _ol_format_GeoJSON_.readGeometry_ = function(object, opt_options) { } var geometryReader = _ol_format_GeoJSON_.GEOMETRY_READERS_[object.type]; return ( - /** @type {ol.geom.Geometry} */ _ol_format_Feature_.transformWithOptions( + /** @type {ol.geom.Geometry} */ FeatureFormat.transformWithOptions( geometryReader(object), false, opt_options) ); }; @@ -172,7 +172,7 @@ _ol_format_GeoJSON_.readPolygonGeometry_ = function(object) { _ol_format_GeoJSON_.writeGeometry_ = function(geometry, opt_options) { var geometryWriter = _ol_format_GeoJSON_.GEOMETRY_WRITERS_[geometry.getType()]; return geometryWriter(/** @type {ol.geom.Geometry} */ ( - _ol_format_Feature_.transformWithOptions(geometry, true, opt_options)), + FeatureFormat.transformWithOptions(geometry, true, opt_options)), opt_options); }; diff --git a/src/ol/format/IGC.js b/src/ol/format/IGC.js index dc238e7445..e9b668e195 100644 --- a/src/ol/format/IGC.js +++ b/src/ol/format/IGC.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_IGCZ_ from '../format/IGCZ.js'; import _ol_format_TextFeature_ from '../format/TextFeature.js'; import GeometryLayout from '../geom/GeometryLayout.js'; @@ -161,7 +161,7 @@ _ol_format_IGC_.prototype.readFeatureFromText = function(text, opt_options) { var layout = altitudeMode == _ol_format_IGCZ_.NONE ? GeometryLayout.XYM : GeometryLayout.XYZM; lineString.setFlatCoordinates(layout, flatCoordinates); - var feature = new _ol_Feature_(_ol_format_Feature_.transformWithOptions( + var feature = new _ol_Feature_(FeatureFormat.transformWithOptions( lineString, false, opt_options)); feature.setProperties(properties); return feature; diff --git a/src/ol/format/JSONFeature.js b/src/ol/format/JSONFeature.js index 39facbebbe..b1a1ada243 100644 --- a/src/ol/format/JSONFeature.js +++ b/src/ol/format/JSONFeature.js @@ -2,7 +2,7 @@ * @module ol/format/JSONFeature */ import {inherits} from '../index.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_FormatType_ from '../format/FormatType.js'; /** @@ -16,10 +16,10 @@ import _ol_format_FormatType_ from '../format/FormatType.js'; * @extends {ol.format.Feature} */ var _ol_format_JSONFeature_ = function() { - _ol_format_Feature_.call(this); + FeatureFormat.call(this); }; -inherits(_ol_format_JSONFeature_, _ol_format_Feature_); +inherits(_ol_format_JSONFeature_, FeatureFormat); /** diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 6237861a47..50cddfb9bf 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -11,7 +11,7 @@ import _ol_Feature_ from '../Feature.js'; import _ol_array_ from '../array.js'; import _ol_asserts_ from '../asserts.js'; import _ol_color_ from '../color.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_XMLFeature_ from '../format/XMLFeature.js'; import _ol_format_XSD_ from '../format/XSD.js'; import GeometryCollection from '../geom/GeometryCollection.js'; @@ -1716,7 +1716,7 @@ _ol_format_KML_.prototype.readPlacemark_ = function(node, objectStack) { var geometry = object['geometry']; if (geometry) { - _ol_format_Feature_.transformWithOptions(geometry, false, options); + FeatureFormat.transformWithOptions(geometry, false, options); } feature.setGeometry(geometry); delete object['geometry']; @@ -2471,7 +2471,7 @@ _ol_format_KML_.writePlacemark_ = function(node, feature, objectStack) { var geometry = feature.getGeometry(); if (geometry) { geometry = - _ol_format_Feature_.transformWithOptions(geometry, true, options); + FeatureFormat.transformWithOptions(geometry, true, options); } _ol_xml_.pushSerializeAndPop(context, _ol_format_KML_.PLACEMARK_SERIALIZERS_, _ol_format_KML_.GEOMETRY_NODE_FACTORY_, [geometry], objectStack); diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index 954fb6d1ef..86b6717828 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -6,7 +6,7 @@ import {inherits} from '../index.js'; import _ol_asserts_ from '../asserts.js'; import PBF from 'pbf'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_FormatType_ from '../format/FormatType.js'; import GeometryLayout from '../geom/GeometryLayout.js'; import GeometryType from '../geom/GeometryType.js'; @@ -32,7 +32,7 @@ import _ol_render_Feature_ from '../render/Feature.js'; */ var _ol_format_MVT_ = function(opt_options) { - _ol_format_Feature_.call(this); + FeatureFormat.call(this); var options = opt_options ? opt_options : {}; @@ -79,7 +79,7 @@ var _ol_format_MVT_ = function(opt_options) { }; -inherits(_ol_format_MVT_, _ol_format_Feature_); +inherits(_ol_format_MVT_, FeatureFormat); /** @@ -322,7 +322,7 @@ _ol_format_MVT_.prototype.createFeature_ = function(pbf, rawFeature, opt_options if (this.geometryName_) { feature.setGeometryName(this.geometryName_); } - var geometry = _ol_format_Feature_.transformWithOptions(geom, false, this.adaptOptions(opt_options)); + var geometry = FeatureFormat.transformWithOptions(geom, false, this.adaptOptions(opt_options)); feature.setGeometry(geometry); feature.setId(id); feature.setProperties(values); diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index c53ef23980..2108f24485 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -5,7 +5,7 @@ import {inherits} from '../index.js'; import _ol_array_ from '../array.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_XMLFeature_ from '../format/XMLFeature.js'; import GeometryLayout from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; @@ -57,7 +57,7 @@ _ol_format_OSMXML_.readNode_ = function(node, objectStack) { }, _ol_format_OSMXML_.NODE_PARSERS_, node, objectStack); if (!_ol_obj_.isEmpty(values.tags)) { var geometry = new Point(coordinates); - _ol_format_Feature_.transformWithOptions(geometry, false, options); + FeatureFormat.transformWithOptions(geometry, false, options); var feature = new _ol_Feature_(geometry); feature.setId(id); feature.setProperties(values.tags); @@ -192,7 +192,7 @@ _ol_format_OSMXML_.prototype.readFeaturesFromNode = function(node, opt_options) geometry = new LineString(null); geometry.setFlatCoordinates(GeometryLayout.XY, flatCoordinates); } - _ol_format_Feature_.transformWithOptions(geometry, false, options); + FeatureFormat.transformWithOptions(geometry, false, options); var feature = new _ol_Feature_(geometry); feature.setId(values.id); feature.setProperties(values.tags); diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index 952b12c7f5..d4c421eddb 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -4,7 +4,7 @@ import {inherits} from '../index.js'; import _ol_asserts_ from '../asserts.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_TextFeature_ from '../format/TextFeature.js'; import GeometryLayout from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; @@ -333,7 +333,7 @@ _ol_format_Polyline_.prototype.readGeometryFromText = function(text, opt_options flatCoordinates, 0, flatCoordinates.length, stride); return ( - /** @type {ol.geom.Geometry} */ _ol_format_Feature_.transformWithOptions( + /** @type {ol.geom.Geometry} */ FeatureFormat.transformWithOptions( new LineString(coordinates, this.geometryLayout_), false, this.adaptOptions(opt_options)) ); @@ -390,7 +390,7 @@ _ol_format_Polyline_.prototype.writeGeometry; */ _ol_format_Polyline_.prototype.writeGeometryText = function(geometry, opt_options) { geometry = /** @type {ol.geom.LineString} */ - (_ol_format_Feature_.transformWithOptions( + (FeatureFormat.transformWithOptions( geometry, true, this.adaptOptions(opt_options))); var flatCoordinates = geometry.getFlatCoordinates(); var stride = geometry.getStride(); diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index d39087ca3f..c66e027519 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -2,7 +2,7 @@ * @module ol/format/TextFeature */ import {inherits} from '../index.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_FormatType_ from '../format/FormatType.js'; /** @@ -16,10 +16,10 @@ import _ol_format_FormatType_ from '../format/FormatType.js'; * @extends {ol.format.Feature} */ var _ol_format_TextFeature_ = function() { - _ol_format_Feature_.call(this); + FeatureFormat.call(this); }; -inherits(_ol_format_TextFeature_, _ol_format_Feature_); +inherits(_ol_format_TextFeature_, FeatureFormat); /** diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 212079a062..f580fa7d05 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_JSONFeature_ from '../format/JSONFeature.js'; import LineString from '../geom/LineString.js'; import MultiLineString from '../geom/MultiLineString.js'; @@ -260,7 +260,7 @@ _ol_format_TopoJSON_.readFeatureFromGeometry_ = function(object, arcs, } var feature = new _ol_Feature_(); feature.setGeometry(/** @type {ol.geom.Geometry} */ ( - _ol_format_Feature_.transformWithOptions(geometry, false, opt_options))); + FeatureFormat.transformWithOptions(geometry, false, opt_options))); if (object.id !== undefined) { feature.setId(object.id); } diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index b26469909c..1528030a73 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.js'; import _ol_Feature_ from '../Feature.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_TextFeature_ from '../format/TextFeature.js'; import GeometryCollection from '../geom/GeometryCollection.js'; import GeometryType from '../geom/GeometryType.js'; @@ -331,7 +331,7 @@ _ol_format_WKT_.prototype.readGeometryFromText = function(text, opt_options) { var geometry = this.parse_(text); if (geometry) { return ( - /** @type {ol.geom.Geometry} */ _ol_format_Feature_.transformWithOptions(geometry, false, opt_options) + /** @type {ol.geom.Geometry} */ FeatureFormat.transformWithOptions(geometry, false, opt_options) ); } else { return null; @@ -408,7 +408,7 @@ _ol_format_WKT_.prototype.writeGeometry; */ _ol_format_WKT_.prototype.writeGeometryText = function(geometry, opt_options) { return _ol_format_WKT_.encode_(/** @type {ol.geom.Geometry} */ ( - _ol_format_Feature_.transformWithOptions(geometry, true, opt_options))); + FeatureFormat.transformWithOptions(geometry, true, opt_options))); }; diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index 0b27764aa1..cacb376bba 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -3,7 +3,7 @@ */ import {inherits} from '../index.js'; import _ol_array_ from '../array.js'; -import _ol_format_Feature_ from '../format/Feature.js'; +import FeatureFormat from '../format/Feature.js'; import _ol_format_FormatType_ from '../format/FormatType.js'; import _ol_xml_ from '../xml.js'; @@ -25,10 +25,10 @@ var _ol_format_XMLFeature_ = function() { */ this.xmlSerializer_ = new XMLSerializer(); - _ol_format_Feature_.call(this); + FeatureFormat.call(this); }; -inherits(_ol_format_XMLFeature_, _ol_format_Feature_); +inherits(_ol_format_XMLFeature_, FeatureFormat); /** diff --git a/test/spec/ol/format/topojson.test.js b/test/spec/ol/format/topojson.test.js index d42aa14a99..90eb5756f1 100644 --- a/test/spec/ol/format/topojson.test.js +++ b/test/spec/ol/format/topojson.test.js @@ -1,7 +1,7 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js'; import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js'; import Polygon from '../../../../src/ol/geom/Polygon.js'; -import _ol_format_Feature_ from '../../../../src/ol/format/Feature.js'; +import FeatureFormat from '../../../../src/ol/format/Feature.js'; import {transform} from '../../../../src/ol/proj.js'; import _ol_format_TopoJSON_ from '../../../../src/ol/format/TopoJSON.js'; @@ -47,7 +47,7 @@ describe('ol.format.TopoJSON', function() { describe('constructor', function() { it('creates a new format', function() { - expect(format).to.be.a(_ol_format_Feature_); + expect(format).to.be.a(FeatureFormat); expect(format).to.be.a(_ol_format_TopoJSON_); }); });