diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index 823f7957ba..728d4e4da8 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -11,7 +11,7 @@ import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import _ol_geom_GeometryType_ from '../geom/GeometryType.js'; import LineString from '../geom/LineString.js'; import _ol_geom_LinearRing_ from '../geom/LinearRing.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -185,7 +185,7 @@ _ol_format_EsriJSON_.readLineStringGeometry_ = function(object) { */ _ol_format_EsriJSON_.readMultiLineStringGeometry_ = function(object) { var layout = _ol_format_EsriJSON_.getGeometryLayout_(object); - return new _ol_geom_MultiLineString_(object.paths, layout); + return new MultiLineString(object.paths, layout); }; diff --git a/src/ol/format/GML3.js b/src/ol/format/GML3.js index 082c42880d..bb79e73991 100644 --- a/src/ol/format/GML3.js +++ b/src/ol/format/GML3.js @@ -10,7 +10,7 @@ import _ol_format_XSD_ from '../format/XSD.js'; import _ol_geom_Geometry_ from '../geom/Geometry.js'; import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import _ol_geom_Polygon_ from '../geom/Polygon.js'; import _ol_obj_ from '../obj.js'; @@ -100,7 +100,7 @@ _ol_format_GML3_.prototype.readMultiCurve_ = function(node, objectStack) { var lineStrings = _ol_xml_.pushParseAndPop([], this.MULTICURVE_PARSERS_, node, objectStack, this); if (lineStrings) { - var multiLineString = new _ol_geom_MultiLineString_(null); + var multiLineString = new MultiLineString(null); multiLineString.setLineStrings(lineStrings); return multiLineString; } else { diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index cadcbf2f6b..66520fb372 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -12,7 +12,7 @@ import _ol_format_XMLFeature_ from '../format/XMLFeature.js'; import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; import _ol_geom_LinearRing_ from '../geom/LinearRing.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -298,7 +298,7 @@ _ol_format_GMLBase_.prototype.readMultiLineString = function(node, objectStack) var lineStrings = _ol_xml_.pushParseAndPop([], this.MULTILINESTRING_PARSERS_, node, objectStack, this); if (lineStrings) { - var multiLineString = new _ol_geom_MultiLineString_(null); + var multiLineString = new MultiLineString(null); multiLineString.setLineStrings(lineStrings); return multiLineString; } else { diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index adbff063a9..a8d4a7264a 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -9,7 +9,7 @@ import _ol_format_XMLFeature_ from '../format/XMLFeature.js'; import _ol_format_XSD_ from '../format/XSD.js'; import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import Point from '../geom/Point.js'; import {get as getProjection} from '../proj.js'; import _ol_xml_ from '../xml.js'; @@ -273,7 +273,7 @@ _ol_format_GPX_.readTrk_ = function(node, objectStack) { var layoutOptions = /** @type {ol.LayoutOptions} */ (values['layoutOptions']); delete values['layoutOptions']; var layout = _ol_format_GPX_.applyLayoutOptions_(layoutOptions, flatCoordinates, ends); - var geometry = new _ol_geom_MultiLineString_(null); + var geometry = new MultiLineString(null); geometry.setFlatCoordinates(layout, flatCoordinates, ends); _ol_format_Feature_.transformWithOptions(geometry, false, options); var feature = new _ol_Feature_(geometry); diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index fbf59e3d40..a2604444af 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -11,7 +11,7 @@ import _ol_format_Feature_ from '../format/Feature.js'; import _ol_format_JSONFeature_ from '../format/JSONFeature.js'; import _ol_geom_GeometryCollection_ from '../geom/GeometryCollection.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -129,7 +129,7 @@ _ol_format_GeoJSON_.readLineStringGeometry_ = function(object) { * @return {ol.geom.MultiLineString} MultiLineString. */ _ol_format_GeoJSON_.readMultiLineStringGeometry_ = function(object) { - return new _ol_geom_MultiLineString_(object.coordinates); + return new MultiLineString(object.coordinates); }; diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 6f62d41f88..59b407ec8c 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -18,7 +18,7 @@ import _ol_geom_GeometryCollection_ from '../geom/GeometryCollection.js'; import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import _ol_geom_GeometryType_ from '../geom/GeometryType.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -788,7 +788,7 @@ _ol_format_KML_.readGxMultiTrack_ = function(node, objectStack) { if (!lineStrings) { return undefined; } - var multiLineString = new _ol_geom_MultiLineString_(null); + var multiLineString = new MultiLineString(null); multiLineString.setLineStrings(lineStrings); return multiLineString; }; @@ -940,7 +940,7 @@ _ol_format_KML_.readMultiGeometry_ = function(node, objectStack) { multiGeometry.setFlatCoordinates(layout, flatCoordinates); _ol_format_KML_.setCommonGeometryProperties_(multiGeometry, geometries); } else if (type == _ol_geom_GeometryType_.LINE_STRING) { - multiGeometry = new _ol_geom_MultiLineString_(null); + multiGeometry = new MultiLineString(null); multiGeometry.setLineStrings(geometries); _ol_format_KML_.setCommonGeometryProperties_(multiGeometry, geometries); } else if (type == _ol_geom_GeometryType_.POLYGON) { diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index ca0de276f4..2fa1eb05b0 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -11,7 +11,7 @@ import _ol_format_FormatType_ from '../format/FormatType.js'; import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import _ol_geom_GeometryType_ from '../geom/GeometryType.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -314,7 +314,7 @@ _ol_format_MVT_.prototype.createFeature_ = function(pbf, rawFeature, opt_options geometryType === _ol_geom_GeometryType_.LINE_STRING ? new LineString(null) : geometryType === _ol_geom_GeometryType_.POLYGON ? new _ol_geom_Polygon_(null) : geometryType === _ol_geom_GeometryType_.MULTI_POINT ? new MultiPoint (null) : - geometryType === _ol_geom_GeometryType_.MULTI_LINE_STRING ? new _ol_geom_MultiLineString_(null) : + geometryType === _ol_geom_GeometryType_.MULTI_LINE_STRING ? new MultiLineString(null) : null; } geom.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, flatCoordinates, ends); diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 8545ea3cc3..61d554db61 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -6,7 +6,7 @@ import _ol_Feature_ from '../Feature.js'; import _ol_format_Feature_ from '../format/Feature.js'; import _ol_format_JSONFeature_ from '../format/JSONFeature.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -158,7 +158,7 @@ _ol_format_TopoJSON_.readMultiLineStringGeometry_ = function(object, arcs) { for (i = 0, ii = object.arcs.length; i < ii; ++i) { coordinates[i] = _ol_format_TopoJSON_.concatenateArcs_(object.arcs[i], arcs); } - return new _ol_geom_MultiLineString_(coordinates); + return new MultiLineString(coordinates); }; diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index 8914d41f9d..6a9eba090c 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -9,7 +9,7 @@ import _ol_geom_GeometryCollection_ from '../geom/GeometryCollection.js'; import _ol_geom_GeometryType_ from '../geom/GeometryType.js'; import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -922,7 +922,7 @@ _ol_format_WKT_.Parser.GeometryConstructor_ = { 'LINESTRING': LineString, 'POLYGON': _ol_geom_Polygon_, 'MULTIPOINT': MultiPoint, - 'MULTILINESTRING': _ol_geom_MultiLineString_, + 'MULTILINESTRING': MultiLineString, 'MULTIPOLYGON': _ol_geom_MultiPolygon_ }; diff --git a/src/ol/geom/MultiLineString.js b/src/ol/geom/MultiLineString.js index 60c46d085e..c15b9a1dbe 100644 --- a/src/ol/geom/MultiLineString.js +++ b/src/ol/geom/MultiLineString.js @@ -25,7 +25,7 @@ import _ol_geom_flat_simplify_ from '../geom/flat/simplify.js'; * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api */ -var _ol_geom_MultiLineString_ = function(coordinates, opt_layout) { +var MultiLineString = function(coordinates, opt_layout) { _ol_geom_SimpleGeometry_.call(this); @@ -51,7 +51,7 @@ var _ol_geom_MultiLineString_ = function(coordinates, opt_layout) { }; -inherits(_ol_geom_MultiLineString_, _ol_geom_SimpleGeometry_); +inherits(MultiLineString, _ol_geom_SimpleGeometry_); /** @@ -59,7 +59,7 @@ inherits(_ol_geom_MultiLineString_, _ol_geom_SimpleGeometry_); * @param {ol.geom.LineString} lineString LineString. * @api */ -_ol_geom_MultiLineString_.prototype.appendLineString = function(lineString) { +MultiLineString.prototype.appendLineString = function(lineString) { if (!this.flatCoordinates) { this.flatCoordinates = lineString.getFlatCoordinates().slice(); } else { @@ -77,8 +77,8 @@ _ol_geom_MultiLineString_.prototype.appendLineString = function(lineString) { * @override * @api */ -_ol_geom_MultiLineString_.prototype.clone = function() { - var multiLineString = new _ol_geom_MultiLineString_(null); +MultiLineString.prototype.clone = function() { + var multiLineString = new MultiLineString(null); multiLineString.setFlatCoordinates( this.layout, this.flatCoordinates.slice(), this.ends_.slice()); return multiLineString; @@ -88,7 +88,7 @@ _ol_geom_MultiLineString_.prototype.clone = function() { /** * @inheritDoc */ -_ol_geom_MultiLineString_.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) { +MultiLineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) { if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) { return minSquaredDistance; } @@ -125,7 +125,7 @@ _ol_geom_MultiLineString_.prototype.closestPointXY = function(x, y, closestPoint * @return {ol.Coordinate} Coordinate. * @api */ -_ol_geom_MultiLineString_.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) { +MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) { if ((this.layout != _ol_geom_GeometryLayout_.XYM && this.layout != _ol_geom_GeometryLayout_.XYZM) || this.flatCoordinates.length === 0) { @@ -144,7 +144,7 @@ _ol_geom_MultiLineString_.prototype.getCoordinateAtM = function(m, opt_extrapola * @override * @api */ -_ol_geom_MultiLineString_.prototype.getCoordinates = function() { +MultiLineString.prototype.getCoordinates = function() { return _ol_geom_flat_inflate_.coordinatess( this.flatCoordinates, 0, this.ends_, this.stride); }; @@ -153,7 +153,7 @@ _ol_geom_MultiLineString_.prototype.getCoordinates = function() { /** * @return {Array.} Ends. */ -_ol_geom_MultiLineString_.prototype.getEnds = function() { +MultiLineString.prototype.getEnds = function() { return this.ends_; }; @@ -164,7 +164,7 @@ _ol_geom_MultiLineString_.prototype.getEnds = function() { * @return {ol.geom.LineString} LineString. * @api */ -_ol_geom_MultiLineString_.prototype.getLineString = function(index) { +MultiLineString.prototype.getLineString = function(index) { if (index < 0 || this.ends_.length <= index) { return null; } @@ -180,7 +180,7 @@ _ol_geom_MultiLineString_.prototype.getLineString = function(index) { * @return {Array.} LineStrings. * @api */ -_ol_geom_MultiLineString_.prototype.getLineStrings = function() { +MultiLineString.prototype.getLineStrings = function() { var flatCoordinates = this.flatCoordinates; var ends = this.ends_; var layout = this.layout; @@ -202,7 +202,7 @@ _ol_geom_MultiLineString_.prototype.getLineStrings = function() { /** * @return {Array.} Flat midpoints. */ -_ol_geom_MultiLineString_.prototype.getFlatMidpoints = function() { +MultiLineString.prototype.getFlatMidpoints = function() { var midpoints = []; var flatCoordinates = this.flatCoordinates; var offset = 0; @@ -223,13 +223,13 @@ _ol_geom_MultiLineString_.prototype.getFlatMidpoints = function() { /** * @inheritDoc */ -_ol_geom_MultiLineString_.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) { +MultiLineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) { var simplifiedFlatCoordinates = []; var simplifiedEnds = []; simplifiedFlatCoordinates.length = _ol_geom_flat_simplify_.douglasPeuckers( this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0, simplifiedEnds); - var simplifiedMultiLineString = new _ol_geom_MultiLineString_(null); + var simplifiedMultiLineString = new MultiLineString(null); simplifiedMultiLineString.setFlatCoordinates( _ol_geom_GeometryLayout_.XY, simplifiedFlatCoordinates, simplifiedEnds); return simplifiedMultiLineString; @@ -240,7 +240,7 @@ _ol_geom_MultiLineString_.prototype.getSimplifiedGeometryInternal = function(squ * @inheritDoc * @api */ -_ol_geom_MultiLineString_.prototype.getType = function() { +MultiLineString.prototype.getType = function() { return _ol_geom_GeometryType_.MULTI_LINE_STRING; }; @@ -249,7 +249,7 @@ _ol_geom_MultiLineString_.prototype.getType = function() { * @inheritDoc * @api */ -_ol_geom_MultiLineString_.prototype.intersectsExtent = function(extent) { +MultiLineString.prototype.intersectsExtent = function(extent) { return _ol_geom_flat_intersectsextent_.lineStrings( this.flatCoordinates, 0, this.ends_, this.stride, extent); }; @@ -262,7 +262,7 @@ _ol_geom_MultiLineString_.prototype.intersectsExtent = function(extent) { * @override * @api */ -_ol_geom_MultiLineString_.prototype.setCoordinates = function(coordinates, opt_layout) { +MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) { if (!coordinates) { this.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, null, this.ends_); } else { @@ -283,7 +283,7 @@ _ol_geom_MultiLineString_.prototype.setCoordinates = function(coordinates, opt_l * @param {Array.} flatCoordinates Flat coordinates. * @param {Array.} ends Ends. */ -_ol_geom_MultiLineString_.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) { +MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) { this.setFlatCoordinatesInternal(layout, flatCoordinates); this.ends_ = ends; this.changed(); @@ -293,7 +293,7 @@ _ol_geom_MultiLineString_.prototype.setFlatCoordinates = function(layout, flatCo /** * @param {Array.} lineStrings LineStrings. */ -_ol_geom_MultiLineString_.prototype.setLineStrings = function(lineStrings) { +MultiLineString.prototype.setLineStrings = function(lineStrings) { var layout = this.getLayout(); var flatCoordinates = []; var ends = []; @@ -308,4 +308,4 @@ _ol_geom_MultiLineString_.prototype.setLineStrings = function(lineStrings) { } this.setFlatCoordinates(layout, flatCoordinates, ends); }; -export default _ol_geom_MultiLineString_; +export default MultiLineString; diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index 1d9e499cc8..6190129485 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -14,7 +14,7 @@ import _ol_functions_ from '../functions.js'; import _ol_geom_Circle_ from '../geom/Circle.js'; import _ol_geom_GeometryType_ from '../geom/GeometryType.js'; import LineString from '../geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../geom/MultiLineString.js'; +import MultiLineString from '../geom/MultiLineString.js'; import MultiPoint from '../geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../geom/MultiPolygon.js'; import Point from '../geom/Point.js'; @@ -674,7 +674,7 @@ _ol_interaction_Draw_.prototype.finishDrawing = function() { if (this.type_ === _ol_geom_GeometryType_.MULTI_POINT) { sketchFeature.setGeometry(new MultiPoint([coordinates])); } else if (this.type_ === _ol_geom_GeometryType_.MULTI_LINE_STRING) { - sketchFeature.setGeometry(new _ol_geom_MultiLineString_([coordinates])); + sketchFeature.setGeometry(new MultiLineString([coordinates])); } else if (this.type_ === _ol_geom_GeometryType_.MULTI_POLYGON) { sketchFeature.setGeometry(new _ol_geom_MultiPolygon_([coordinates])); } diff --git a/test/rendering/ol/style/text.test.js b/test/rendering/ol/style/text.test.js index a0ebb33b03..c1eb6af0d1 100644 --- a/test/rendering/ol/style/text.test.js +++ b/test/rendering/ol/style/text.test.js @@ -1,6 +1,6 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js'; import LineString from '../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../src/ol/geom/Point.js'; import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js'; @@ -264,7 +264,7 @@ describe('ol.rendering.style.Text', function() { createMap('canvas'); var line = new LineString(); line.setFlatCoordinates('XY', nicePath); - var geom = new _ol_geom_MultiLineString_(null); + var geom = new MultiLineString(null); geom.appendLineString(line); line = line.clone(); line.translate(0, 50); diff --git a/test/spec/ol/format/esrijson.test.js b/test/spec/ol/format/esrijson.test.js index f2ac085e10..7208e1f4b1 100644 --- a/test/spec/ol/format/esrijson.test.js +++ b/test/spec/ol/format/esrijson.test.js @@ -3,7 +3,7 @@ import * as _ol_extent_ from '../../../../src/ol/extent.js'; import _ol_format_EsriJSON_ from '../../../../src/ol/format/EsriJSON.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../src/ol/geom/Point.js'; @@ -192,7 +192,7 @@ describe('ol.format.EsriJSON', function() { var feature = format.readFeature(multiLineStringEsriJSON); expect(feature).to.be.an(_ol_Feature_); var geometry = feature.getGeometry(); - expect(geometry).to.be.an(_ol_geom_MultiLineString_); + expect(geometry).to.be.an(MultiLineString); expect(geometry.getCoordinates()).to.eql([ [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]], [[105.0, 3.0], [106.0, 4.0], [107.0, 3.0], [108.0, 4.0]] @@ -487,7 +487,7 @@ describe('ol.format.EsriJSON', function() { ]] }); var obj = format.readGeometry(str); - expect(obj).to.be.a(_ol_geom_MultiLineString_); + expect(obj).to.be.a(MultiLineString); expect(obj.getCoordinates()).to.eql([ [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]], [[105.0, 3.0], [106.0, 4.0], [107.0, 3.0], [108.0, 4.0]] @@ -505,7 +505,7 @@ describe('ol.format.EsriJSON', function() { ]] }); var obj = format.readGeometry(str); - expect(obj).to.be.a(_ol_geom_MultiLineString_); + expect(obj).to.be.a(MultiLineString); expect(obj.getCoordinates()).to.eql([ [[102.0, 0.0, 1], [103.0, 1.0, 1], [104.0, 0.0, 1], [105.0, 1.0, 1]], [[105.0, 3.0, 1], [106.0, 4.0, 1], [107.0, 3.0, 1], [108.0, 4.0, 1]] @@ -523,7 +523,7 @@ describe('ol.format.EsriJSON', function() { ]] }); var obj = format.readGeometry(str); - expect(obj).to.be.a(_ol_geom_MultiLineString_); + expect(obj).to.be.a(MultiLineString); expect(obj.getCoordinates()).to.eql([ [[102.0, 0.0, 1], [103.0, 1.0, 1], [104.0, 0.0, 1], [105.0, 1.0, 1]], [[105.0, 3.0, 1], [106.0, 4.0, 1], [107.0, 3.0, 1], [108.0, 4.0, 1]] @@ -542,7 +542,7 @@ describe('ol.format.EsriJSON', function() { ]] }); var obj = format.readGeometry(str); - expect(obj).to.be.a(_ol_geom_MultiLineString_); + expect(obj).to.be.a(MultiLineString); expect(obj.getCoordinates()).to.eql([ [[102, 0, 1, 2], [103, 1, 1, 2], [104, 0, 1, 2], [105, 1, 1, 2]], [[105, 3, 1, 2], [106, 4, 1, 2], [107, 3, 1, 2], [108, 4, 1, 2]] @@ -903,7 +903,7 @@ describe('ol.format.EsriJSON', function() { }); it('encodes multilinestring', function() { - var multilinestring = new _ol_geom_MultiLineString_([ + var multilinestring = new MultiLineString([ [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]], [[105.0, 3.0], [106.0, 4.0], [107.0, 3.0], [108.0, 4.0]] ]); @@ -913,7 +913,7 @@ describe('ol.format.EsriJSON', function() { }); it('encodes XYZ multilinestring', function() { - var multilinestring = new _ol_geom_MultiLineString_([ + var multilinestring = new MultiLineString([ [[102.0, 0.0, 1], [103.0, 1.0, 2], [104.0, 0.0, 3], [105.0, 1.0, 4]], [[105.0, 3.0, 1], [106.0, 4.0, 2], [107.0, 3.0, 3], [108.0, 4.0, 4]] ], 'XYZ'); @@ -923,7 +923,7 @@ describe('ol.format.EsriJSON', function() { }); it('encodes XYM multilinestring', function() { - var multilinestring = new _ol_geom_MultiLineString_([ + var multilinestring = new MultiLineString([ [[102.0, 0.0, 1], [103.0, 1.0, 2], [104.0, 0.0, 3], [105.0, 1.0, 4]], [[105.0, 3.0, 1], [106.0, 4.0, 2], [107.0, 3.0, 3], [108.0, 4.0, 4]] ], 'XYM'); @@ -933,7 +933,7 @@ describe('ol.format.EsriJSON', function() { }); it('encodes XYZM multilinestring', function() { - var multilinestring = new _ol_geom_MultiLineString_([ + var multilinestring = new MultiLineString([ [[102.0, 0.0, 1, 0], [103.0, 1.0, 2, 2], [104.0, 0.0, 3, 1], [105.0, 1.0, 4, 2]], [[105.0, 3.0, 1, 0], [106.0, 4.0, 2, 1], [107.0, 3.0, 3, 1], diff --git a/test/spec/ol/format/gml.test.js b/test/spec/ol/format/gml.test.js index c6ebb41864..9ea90f117a 100644 --- a/test/spec/ol/format/gml.test.js +++ b/test/spec/ol/format/gml.test.js @@ -3,7 +3,7 @@ import _ol_format_GML_ from '../../../../src/ol/format/GML.js'; import _ol_format_GML2_ from '../../../../src/ol/format/GML2.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../src/ol/geom/Point.js'; @@ -284,7 +284,7 @@ describe('ol.format.GML2', function() { ' '; var feature = new _ol_Feature_({ - geometry: new _ol_geom_MultiLineString_([[[1.1, 2], [3, 4.2]]]) + geometry: new MultiLineString([[[1.1, 2], [3, 4.2]]]) }); feature.setId(1); var objectStack = [{ @@ -771,7 +771,7 @@ describe('ol.format.GML3', function() { ' ' + ''; var g = readGeometry(format, text); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql( [[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]); format = new _ol_format_GML_({srsName: 'CRS:84', multiCurve: false}); @@ -793,7 +793,7 @@ describe('ol.format.GML3', function() { ' ' + ''; var g = readGeometry(format, text); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql( [[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]); }); @@ -916,7 +916,7 @@ describe('ol.format.GML3', function() { ' ' + ''; var g = readGeometry(format, text); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql( [[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]); var serialized = format.writeGeometryNode(g); @@ -947,7 +947,7 @@ describe('ol.format.GML3', function() { ' ' + ''; var g = readGeometry(format, text); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql( [[[1, 2, 0], [2, 3, 0]], [[3, 4, 0], [4, 5, 0]]]); format = new _ol_format_GML_({srsName: 'CRS:84', curve: true}); diff --git a/test/spec/ol/format/gpx.test.js b/test/spec/ol/format/gpx.test.js index ae55b4b019..15cb6121fe 100644 --- a/test/spec/ol/format/gpx.test.js +++ b/test/spec/ol/format/gpx.test.js @@ -1,7 +1,7 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js'; import _ol_format_GPX_ from '../../../../src/ol/format/GPX.js'; import LineString from '../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import Point from '../../../../src/ol/geom/Point.js'; import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js'; import {get as getProjection, transform} from '../../../../src/ol/proj.js'; @@ -162,7 +162,7 @@ describe('ol.format.GPX', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql([]); expect(g.getLayout()).to.be('XY'); }); @@ -218,7 +218,7 @@ describe('ol.format.GPX', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql([[]]); expect(g.getLayout()).to.be('XY'); var serialized = format.writeFeaturesNode(fs); @@ -249,7 +249,7 @@ describe('ol.format.GPX', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql([ [[2, 1, 3, 1263115752], [6, 5, 7, 1263115812]] ]); @@ -284,7 +284,7 @@ describe('ol.format.GPX', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); var p1 = transform([2, 1], 'EPSG:4326', 'EPSG:3857'); p1.push(3, 1263115752); var p2 = transform([6, 5], 'EPSG:4326', 'EPSG:3857'); @@ -331,7 +331,7 @@ describe('ol.format.GPX', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql([ [[2, 1, 3, 1263115752], [6, 5, 7, 1263115812]], [[9, 8, 10, 1263115872], [12, 11, 13, 1263115932]] diff --git a/test/spec/ol/format/kml.test.js b/test/spec/ol/format/kml.test.js index 9a68545ed8..82218bafc7 100644 --- a/test/spec/ol/format/kml.test.js +++ b/test/spec/ol/format/kml.test.js @@ -5,7 +5,7 @@ import _ol_format_KML_ from '../../../../src/ol/format/KML.js'; import _ol_geom_GeometryCollection_ from '../../../../src/ol/geom/GeometryCollection.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import _ol_geom_LinearRing_ from '../../../../src/ol/geom/LinearRing.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../src/ol/geom/Point.js'; @@ -1008,7 +1008,7 @@ describe('ol.format.KML', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); expect(g.getCoordinates()).to.eql( [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]); expect(g.get('extrude')).to.be.an('array'); @@ -1027,7 +1027,7 @@ describe('ol.format.KML', function() { it('can write MultiLineString geometries', function() { var layout = 'XYZ'; - var multiLineString = new _ol_geom_MultiLineString_( + var multiLineString = new MultiLineString( [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]], layout); var features = [new _ol_Feature_(multiLineString)]; var node = format.writeFeaturesNode(features); @@ -1289,7 +1289,7 @@ describe('ol.format.KML', function() { var f = fs[0]; expect(f).to.be.an(_ol_Feature_); var g = f.getGeometry(); - expect(g).to.be.an(_ol_geom_MultiLineString_); + expect(g).to.be.an(MultiLineString); var gs = g.getLineStrings(); expect(gs).to.have.length(2); expect(gs[0]).to.be.an(LineString); diff --git a/test/spec/ol/format/wfs.test.js b/test/spec/ol/format/wfs.test.js index ffedc2e04f..62f893570c 100644 --- a/test/spec/ol/format/wfs.test.js +++ b/test/spec/ol/format/wfs.test.js @@ -3,7 +3,7 @@ import _ol_format_GML2_ from '../../../../src/ol/format/GML2.js'; import _ol_format_WFS_ from '../../../../src/ol/format/WFS.js'; import _ol_format_filter_ from '../../../../src/ol/format/filter.js'; import LineString from '../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js'; @@ -697,7 +697,7 @@ describe('ol.format.WFS', function() { it('creates the correct srsName', function() { var format = new _ol_format_WFS_(); var insertFeature = new _ol_Feature_({ - the_geom: new _ol_geom_MultiLineString_([[ + the_geom: new MultiLineString([[ [-5178372.1885436, 1992365.7775042], [-4434792.7774889, 1601008.1927386], [-4043435.1927233, 2148908.8114105] @@ -729,7 +729,7 @@ describe('ol.format.WFS', function() { var format = new _ol_format_WFS_(); var updateFeature = new _ol_Feature_(); updateFeature.setGeometryName('the_geom'); - updateFeature.setGeometry(new _ol_geom_MultiLineString_([[ + updateFeature.setGeometry(new MultiLineString([[ [-12279454, 6741885], [-12064207, 6732101], [-11941908, 6595126], @@ -748,7 +748,7 @@ describe('ol.format.WFS', function() { it('creates the correct update if geometry name is alias', function() { var format = new _ol_format_WFS_(); - var updateFeature = new _ol_Feature_(new _ol_geom_MultiLineString_([[ + var updateFeature = new _ol_Feature_(new MultiLineString([[ [-12279454, 6741885], [-12064207, 6732101], [-11941908, 6595126], @@ -774,7 +774,7 @@ describe('ol.format.WFS', function() { var format = new _ol_format_WFS_(); var updateFeature = new _ol_Feature_(); updateFeature.setGeometryName('the_geom'); - updateFeature.setGeometry(new _ol_geom_MultiLineString_([[ + updateFeature.setGeometry(new MultiLineString([[ [-12279454, 6741885], [-12064207, 6732101], [-11941908, 6595126], @@ -797,7 +797,7 @@ describe('ol.format.WFS', function() { var format = new _ol_format_WFS_(); var updateFeature = new _ol_Feature_(); updateFeature.setGeometryName('the_geom'); - updateFeature.setGeometry(new _ol_geom_MultiLineString_([[ + updateFeature.setGeometry(new MultiLineString([[ [-12279454, 6741885], [-12064207, 6732101], [-11941908, 6595126], @@ -830,14 +830,14 @@ describe('ol.format.WFS', function() { var format = new _ol_format_WFS_(); var updateFeature = new _ol_Feature_(); updateFeature.setGeometryName('the_geom'); - updateFeature.setGeometry(new _ol_geom_MultiLineString_([[ + updateFeature.setGeometry(new MultiLineString([[ [-12279454, 6741885], [-12064207, 6732101], [-11941908, 6595126], [-12240318, 6507071], [-12416429, 6604910] ]])); - updateFeature.set('geom2', new _ol_geom_MultiLineString_([[ + updateFeature.set('geom2', new MultiLineString([[ [-12000000, 6700000], [-12000001, 6700001], [-12000002, 6700002] diff --git a/test/spec/ol/geom/multilinestring.test.js b/test/spec/ol/geom/multilinestring.test.js index cb11f05b06..cd078cd04e 100644 --- a/test/spec/ol/geom/multilinestring.test.js +++ b/test/spec/ol/geom/multilinestring.test.js @@ -1,13 +1,13 @@ import * as _ol_extent_ from '../../../../src/ol/extent.js'; import LineString from '../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; describe('ol.geom.MultiLineString', function() { it('can be constructed with a null geometry', function() { expect(function() { - return new _ol_geom_MultiLineString_(null); + return new MultiLineString(null); }).not.to.throwException(); }); @@ -15,7 +15,7 @@ describe('ol.geom.MultiLineString', function() { var multiLineString; beforeEach(function() { - multiLineString = new _ol_geom_MultiLineString_([]); + multiLineString = new MultiLineString([]); }); it('defaults to layout XY', function() { @@ -55,7 +55,7 @@ describe('ol.geom.MultiLineString', function() { var multiLineString; beforeEach(function() { - multiLineString = new _ol_geom_MultiLineString_( + multiLineString = new MultiLineString( [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]); }); @@ -107,7 +107,7 @@ describe('ol.geom.MultiLineString', function() { var multiLineString; beforeEach(function() { - multiLineString = new _ol_geom_MultiLineString_( + multiLineString = new MultiLineString( [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]); }); @@ -139,7 +139,7 @@ describe('ol.geom.MultiLineString', function() { var multiLineString; beforeEach(function() { - multiLineString = new _ol_geom_MultiLineString_( + multiLineString = new MultiLineString( [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]], 'XYM'); }); @@ -287,7 +287,7 @@ describe('ol.geom.MultiLineString', function() { var multiLineString; beforeEach(function() { - multiLineString = new _ol_geom_MultiLineString_( + multiLineString = new MultiLineString( [[[1, 2, 3, 4], [5, 6, 7, 8]], [[9, 10, 11, 12], [13, 14, 15, 16]]]); }); @@ -318,21 +318,21 @@ describe('ol.geom.MultiLineString', function() { describe('#scale()', function() { it('scales a multi-linestring', function() { - var geom = new _ol_geom_MultiLineString_([[[-10, -20], [10, 20]], [[5, -10], [-5, 10]]]); + var geom = new MultiLineString([[[-10, -20], [10, 20]], [[5, -10], [-5, 10]]]); geom.scale(10); var coordinates = geom.getCoordinates(); expect(coordinates).to.eql([[[-100, -200], [100, 200]], [[50, -100], [-50, 100]]]); }); it('accepts sx and sy', function() { - var geom = new _ol_geom_MultiLineString_([[[-10, -20], [10, 20]], [[5, -10], [-5, 10]]]); + var geom = new MultiLineString([[[-10, -20], [10, 20]], [[5, -10], [-5, 10]]]); geom.scale(2, 3); var coordinates = geom.getCoordinates(); expect(coordinates).to.eql([[[-20, -60], [20, 60]], [[10, -30], [-10, 30]]]); }); it('accepts an anchor', function() { - var geom = new _ol_geom_MultiLineString_([[[-10, -20], [10, 20]], [[5, -10], [-5, 10]]]); + var geom = new MultiLineString([[[-10, -20], [10, 20]], [[5, -10], [-5, 10]]]); geom.scale(3, 2, [10, 20]); var coordinates = geom.getCoordinates(); expect(coordinates).to.eql([[[-50, -60], [10, 20]], [[-5, -40], [-35, 0]]]); @@ -343,7 +343,7 @@ describe('ol.geom.MultiLineString', function() { describe('#setLineStrings', function() { it('sets the line strings', function() { - var multiLineString = new _ol_geom_MultiLineString_(null); + var multiLineString = new MultiLineString(null); var lineString1 = new LineString([[1, 2], [3, 4]]); var lineString2 = new LineString([[5, 6], [7, 8]]); multiLineString.setLineStrings([lineString1, lineString2]); diff --git a/test/spec/ol/interaction/draw.test.js b/test/spec/ol/interaction/draw.test.js index 65cbfa07da..45aa8c8b77 100644 --- a/test/spec/ol/interaction/draw.test.js +++ b/test/spec/ol/interaction/draw.test.js @@ -7,7 +7,7 @@ import _ol_events_ from '../../../../src/ol/events.js'; import _ol_events_condition_ from '../../../../src/ol/events/condition.js'; import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.js'; import LineString from '../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../src/ol/geom/Point.js'; @@ -501,7 +501,7 @@ describe('ol.interaction.Draw', function() { var features = source.getFeatures(); expect(features).to.have.length(1); var geometry = features[0].getGeometry(); - expect(geometry).to.be.a(_ol_geom_MultiLineString_); + expect(geometry).to.be.a(MultiLineString); expect(geometry.getCoordinates()).to.eql([[[10, -20], [30, -20]]]); }); diff --git a/test/spec/ol/render/canvas/immediate.test.js b/test/spec/ol/render/canvas/immediate.test.js index 92fee6d63f..2b70148cb3 100644 --- a/test/spec/ol/render/canvas/immediate.test.js +++ b/test/spec/ol/render/canvas/immediate.test.js @@ -1,7 +1,7 @@ import _ol_geom_Circle_ from '../../../../../src/ol/geom/Circle.js'; import _ol_geom_GeometryCollection_ from '../../../../../src/ol/geom/GeometryCollection.js'; import LineString from '../../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../../src/ol/geom/Point.js'; @@ -111,7 +111,7 @@ describe('ol.render.canvas.Immediate', function() { var context = new _ol_render_canvas_Immediate_(getMockContext(), 1, extent); sinon.spy(context, 'drawMultiLineString'); - var geometry = new _ol_geom_MultiLineString_([[[1, 2], [3, 4]]]); + var geometry = new MultiLineString([[[1, 2], [3, 4]]]); context.drawGeometry(geometry); expect(context.drawMultiLineString.calledOnce).to.be(true); expect(context.drawMultiLineString.firstCall.calledWithExactly(geometry)).to.be(true); diff --git a/test/spec/ol/render/feature.test.js b/test/spec/ol/render/feature.test.js index 8187a3f0cf..c1746da292 100644 --- a/test/spec/ol/render/feature.test.js +++ b/test/spec/ol/render/feature.test.js @@ -1,5 +1,5 @@ import LineString from '../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js'; import _ol_render_Feature_ from '../../../../src/ol/render/Feature.js'; @@ -87,7 +87,7 @@ describe('ol.render.Feature', function() { describe('#getFlatMidpoints()', function() { it('returns correct points and caches them', function() { - var line = new _ol_geom_MultiLineString_([ + var line = new MultiLineString([ [[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]], [[10, 0], [10, 10], [20, 10], [20, 0], [10, 0]] ]); diff --git a/test/spec/ol/render/webgl/immediate.test.js b/test/spec/ol/render/webgl/immediate.test.js index 61ef0bc6af..377c9ae000 100644 --- a/test/spec/ol/render/webgl/immediate.test.js +++ b/test/spec/ol/render/webgl/immediate.test.js @@ -2,7 +2,7 @@ import _ol_Feature_ from '../../../../../src/ol/Feature.js'; import _ol_geom_Circle_ from '../../../../../src/ol/geom/Circle.js'; import _ol_geom_GeometryCollection_ from '../../../../../src/ol/geom/GeometryCollection.js'; import LineString from '../../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../../src/ol/geom/Point.js'; @@ -28,7 +28,7 @@ describe('ol.render.webgl.Immediate', function() { }); circle = new _ol_geom_Circle_([0, 0], 5); line = new LineString([[0, 0], [5, 5]]); - multiLine = new _ol_geom_MultiLineString_([[[0, 0], [5, 5]]]); + multiLine = new MultiLineString([[[0, 0], [5, 5]]]); point = new Point([0, 0]); multiPoint = new MultiPoint([[0, 0]]); polygon = new _ol_geom_Polygon_([[[0, 0], [5, 5], [5, 0], [0, 0]]]); diff --git a/test/spec/ol/render/webgl/linestringreplay.test.js b/test/spec/ol/render/webgl/linestringreplay.test.js index 5c56cc8e03..477a1ab7e8 100644 --- a/test/spec/ol/render/webgl/linestringreplay.test.js +++ b/test/spec/ol/render/webgl/linestringreplay.test.js @@ -1,7 +1,7 @@ import {getUid} from '../../../../../src/ol/index.js'; import _ol_Feature_ from '../../../../../src/ol/Feature.js'; import LineString from '../../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../../src/ol/geom/MultiLineString.js'; import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/webgl/LineStringReplay.js'; import _ol_render_webgl_linestringreplay_defaultshader_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader.js'; import _ol_render_webgl_linestringreplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/linestringreplay/defaultshader/Locations.js'; @@ -82,7 +82,7 @@ describe('ol.render.webgl.LineStringReplay', function() { it('sets the buffer data', function() { var multilinestring; - multilinestring = new _ol_geom_MultiLineString_( + multilinestring = new MultiLineString( [[[1000, 2000], [2000, 3000]], [[1000, 3000], [2000, 4000], [3000, 3000]]]); replay.setFillStrokeStyle(null, strokeStyle1); diff --git a/test/spec/ol/renderer/canvas/replay.test.js b/test/spec/ol/renderer/canvas/replay.test.js index 087de24106..11a6514f24 100644 --- a/test/spec/ol/renderer/canvas/replay.test.js +++ b/test/spec/ol/renderer/canvas/replay.test.js @@ -2,7 +2,7 @@ import {getUid} from '../../../../../src/ol/index.js'; import _ol_Feature_ from '../../../../../src/ol/Feature.js'; import _ol_geom_GeometryCollection_ from '../../../../../src/ol/geom/GeometryCollection.js'; import LineString from '../../../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../../src/ol/geom/MultiPolygon.js'; import Point from '../../../../../src/ol/geom/Point.js'; @@ -234,7 +234,7 @@ describe('ol.render.canvas.ReplayGroup', function() { [[45, 90], [90, 45]])); var linestring = new _ol_Feature_(new LineString( [[45, 90], [45, 45], [90, 45]])); - var multilinestring = new _ol_Feature_(new _ol_geom_MultiLineString_( + var multilinestring = new _ol_Feature_(new MultiLineString( [linestring.getGeometry().getCoordinates(), linestring.getGeometry().getCoordinates()])); var polygon = feature1; var multipolygon = new _ol_Feature_(new _ol_geom_MultiPolygon_( diff --git a/test/spec/ol/renderer/vector.test.js b/test/spec/ol/renderer/vector.test.js index 9087bbe1c8..6376c00150 100644 --- a/test/spec/ol/renderer/vector.test.js +++ b/test/spec/ol/renderer/vector.test.js @@ -3,7 +3,7 @@ import _ol_events_ from '../../../../src/ol/events.js'; import LineString from '../../../../src/ol/geom/LineString.js'; import Point from '../../../../src/ol/geom/Point.js'; import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js'; -import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../../src/ol/geom/MultiPoint.js'; import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js'; import _ol_render_canvas_ReplayGroup_ from '../../../../src/ol/render/canvas/ReplayGroup.js'; @@ -114,7 +114,7 @@ describe('ol.renderer.vector', function() { }); it('does render the multilinestring', function() { - feature.setGeometry(new _ol_geom_MultiLineString_([[[0, 0], [1, 1]]])); + feature.setGeometry(new MultiLineString([[[0, 0], [1, 1]]])); var lineStringReplay = replayGroup.getReplay( style.getZIndex(), 'LineString'); var setFillStrokeStyleSpy = sinon.spy(lineStringReplay, diff --git a/test/spec/ol/sphere.test.js b/test/spec/ol/sphere.test.js index 2b6642cd66..425a7538a4 100644 --- a/test/spec/ol/sphere.test.js +++ b/test/spec/ol/sphere.test.js @@ -6,7 +6,7 @@ import _ol_Sphere_ from '../../../src/ol/Sphere.js'; import _ol_format_WKT_ from '../../../src/ol/format/WKT.js'; import _ol_geom_GeometryCollection_ from '../../../src/ol/geom/GeometryCollection.js'; import LineString from '../../../src/ol/geom/LineString.js'; -import _ol_geom_MultiLineString_ from '../../../src/ol/geom/MultiLineString.js'; +import MultiLineString from '../../../src/ol/geom/MultiLineString.js'; import MultiPoint from '../../../src/ol/geom/MultiPoint.js'; import Point from '../../../src/ol/geom/Point.js'; import _ol_proj_EPSG4326_ from '../../../src/ol/proj/EPSG4326.js'; @@ -138,7 +138,7 @@ describe('ol.Sphere.getLength()', function() { options: {projection: 'EPSG:4326'}, length: 4407939.124914191 }, { - geometry: new _ol_geom_MultiLineString_([ + geometry: new MultiLineString([ [ [115, -32], [131, -22],