From c2228b1d1949c593a27ceeac46100be0fdc1e01b Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Wed, 4 Dec 2013 16:27:03 +0100 Subject: [PATCH] Rename ol.geom.Layout to ol.geom.GeometryLayout --- src/ol/geom/geometry.js | 32 +++++++++++------------ src/ol/geom/linearring.js | 4 +-- src/ol/geom/linestring.js | 8 +++--- src/ol/geom/multilinestring.js | 8 +++--- src/ol/geom/multipoint.js | 8 +++--- src/ol/geom/multipolygon.js | 8 +++--- src/ol/geom/point.js | 8 +++--- src/ol/geom/polygon.js | 8 +++--- test/spec/ol/geom/linestring.test.js | 12 ++++----- test/spec/ol/geom/multilinestring.test.js | 12 ++++----- test/spec/ol/geom/multipoint.test.js | 12 ++++----- test/spec/ol/geom/point.test.js | 8 +++--- test/spec/ol/geom/polygon.test.js | 13 ++++----- 13 files changed, 71 insertions(+), 70 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index d66fc9d95d..5c16dddcd6 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -27,7 +27,7 @@ ol.geom.Type = { /** * @enum {string} */ -ol.geom.Layout = { +ol.geom.GeometryLayout = { XY: 'XY', XYZ: 'XYZ', XYM: 'XYM', @@ -46,9 +46,9 @@ ol.geom.Geometry = function() { /** * @protected - * @type {ol.geom.Layout} + * @type {ol.geom.GeometryLayout} */ - this.layout = ol.geom.Layout.XY; + this.layout = ol.geom.GeometryLayout.XY; /** * @protected @@ -87,15 +87,15 @@ goog.inherits(ol.geom.Geometry, goog.events.EventTarget); /** * @param {number} stride Stride. * @private - * @return {ol.geom.Layout} layout Layout. + * @return {ol.geom.GeometryLayout} layout Layout. */ ol.geom.Geometry.getLayoutForStride_ = function(stride) { if (stride == 2) { - return ol.geom.Layout.XY; + return ol.geom.GeometryLayout.XY; } else if (stride == 3) { - return ol.geom.Layout.XYZ; + return ol.geom.GeometryLayout.XYZ; } else if (stride == 4) { - return ol.geom.Layout.XYZM; + return ol.geom.GeometryLayout.XYZM; } else { throw new Error('unsupported stride: ' + stride); } @@ -103,18 +103,18 @@ ol.geom.Geometry.getLayoutForStride_ = function(stride) { /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @private * @return {number} Stride. */ ol.geom.Geometry.getStrideForLayout_ = function(layout) { - if (layout == ol.geom.Layout.XY) { + if (layout == ol.geom.GeometryLayout.XY) { return 2; - } else if (layout == ol.geom.Layout.XYZ) { + } else if (layout == ol.geom.GeometryLayout.XYZ) { return 3; - } else if (layout == ol.geom.Layout.XYM) { + } else if (layout == ol.geom.GeometryLayout.XYM) { return 3; - } else if (layout == ol.geom.Layout.XYZM) { + } else if (layout == ol.geom.GeometryLayout.XYZM) { return 4; } else { throw new Error('unsupported layout: ' + layout); @@ -172,7 +172,7 @@ ol.geom.Geometry.prototype.getFlatCoordinates = function() { /** - * @return {ol.geom.Layout} Layout. + * @return {ol.geom.GeometryLayout} Layout. */ ol.geom.Geometry.prototype.getLayout = function() { return this.layout; @@ -202,7 +202,7 @@ ol.geom.Geometry.prototype.getType = goog.abstractMethod; /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. * @protected */ @@ -215,7 +215,7 @@ ol.geom.Geometry.prototype.setFlatCoordinatesInternal = /** - * @param {ol.geom.Layout|undefined} layout Layout. + * @param {ol.geom.GeometryLayout|undefined} layout Layout. * @param {Array} coordinates Coordinates. * @param {number} nesting Nesting. * @protected @@ -230,7 +230,7 @@ ol.geom.Geometry.prototype.setLayout = var i; for (i = 0; i < nesting; ++i) { if (coordinates.length === 0) { - this.layout = ol.geom.Layout.XY; + this.layout = ol.geom.GeometryLayout.XY; this.stride = 2; return; } else { diff --git a/src/ol/geom/linearring.js b/src/ol/geom/linearring.js index 7c15fd53a4..a4b6bff880 100644 --- a/src/ol/geom/linearring.js +++ b/src/ol/geom/linearring.js @@ -9,7 +9,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawLinearRing} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.LinearRing = function(coordinates, opt_layout) { goog.base(this); @@ -46,7 +46,7 @@ ol.geom.LinearRing.prototype.getType = function() { /** * @param {ol.geom.RawLinearRing} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) { diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js index 40bfd7c109..99f0dc542f 100644 --- a/src/ol/geom/linestring.js +++ b/src/ol/geom/linestring.js @@ -9,7 +9,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawLineString} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.LineString = function(coordinates, opt_layout) { goog.base(this); @@ -46,12 +46,12 @@ ol.geom.LineString.prototype.getType = function() { /** * @param {ol.geom.RawLineString} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { - this.setFlatCoordinates(ol.geom.Layout.XY, null); + this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null); } else { this.setLayout(opt_layout, coordinates, 1); if (goog.isNull(this.flatCoordinates)) { @@ -65,7 +65,7 @@ ol.geom.LineString.prototype.setCoordinates = /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. */ ol.geom.LineString.prototype.setFlatCoordinates = diff --git a/src/ol/geom/multilinestring.js b/src/ol/geom/multilinestring.js index da4a7c2505..c52a870b0b 100644 --- a/src/ol/geom/multilinestring.js +++ b/src/ol/geom/multilinestring.js @@ -10,7 +10,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawMultiLineString} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.MultiLineString = function(coordinates, opt_layout) { @@ -70,12 +70,12 @@ ol.geom.MultiLineString.prototype.getType = function() { /** * @param {ol.geom.RawMultiLineString} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { - this.setFlatCoordinates(ol.geom.Layout.XY, null, this.ends_); + this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_); } else { this.setLayout(opt_layout, coordinates, 2); if (goog.isNull(this.flatCoordinates)) { @@ -90,7 +90,7 @@ ol.geom.MultiLineString.prototype.setCoordinates = /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. * @param {Array.} ends Ends. */ diff --git a/src/ol/geom/multipoint.js b/src/ol/geom/multipoint.js index 525f720720..942d58f9c8 100644 --- a/src/ol/geom/multipoint.js +++ b/src/ol/geom/multipoint.js @@ -10,7 +10,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawMultiPoint} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.MultiPoint = function(coordinates, opt_layout) { goog.base(this); @@ -53,12 +53,12 @@ ol.geom.MultiPoint.prototype.getType = function() { /** * @param {ol.geom.RawMultiPoint} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { - this.setFlatCoordinates(ol.geom.Layout.XY, null); + this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null); } else { this.setLayout(opt_layout, coordinates, 1); if (goog.isNull(this.flatCoordinates)) { @@ -72,7 +72,7 @@ ol.geom.MultiPoint.prototype.setCoordinates = /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. */ ol.geom.MultiPoint.prototype.setFlatCoordinates = diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js index e4fbdb3d87..d5293373d7 100644 --- a/src/ol/geom/multipolygon.js +++ b/src/ol/geom/multipolygon.js @@ -10,7 +10,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.MultiPolygon = function(coordinates, opt_layout) { @@ -115,12 +115,12 @@ ol.geom.MultiPolygon.prototype.getType = function() { /** * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { - this.setFlatCoordinates(ol.geom.Layout.XY, null, this.endss_); + this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.endss_); } else { this.setLayout(opt_layout, coordinates, 3); if (goog.isNull(this.flatCoordinates)) { @@ -139,7 +139,7 @@ ol.geom.MultiPolygon.prototype.setCoordinates = /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. * @param {Array.>} endss Endss. */ diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index a458ce2160..3f8ac78314 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -11,7 +11,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawPoint} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.Point = function(coordinates, opt_layout) { goog.base(this); @@ -52,11 +52,11 @@ ol.geom.Point.prototype.getType = function() { /** * @param {ol.geom.RawPoint} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { - this.setFlatCoordinates(ol.geom.Layout.XY, null); + this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null); } else { this.setLayout(opt_layout, coordinates, 0); if (goog.isNull(this.flatCoordinates)) { @@ -70,7 +70,7 @@ ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) { /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. */ ol.geom.Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) { diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index 039384ac07..6f1181434d 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -10,7 +10,7 @@ goog.require('ol.geom.flat'); * @constructor * @extends {ol.geom.Geometry} * @param {ol.geom.RawPolygon} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.Polygon = function(coordinates, opt_layout) { @@ -114,11 +114,11 @@ ol.geom.Polygon.prototype.getType = function() { /** * @param {ol.geom.RawPolygon} coordinates Coordinates. - * @param {ol.geom.Layout=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. */ ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { - this.setFlatCoordinates(ol.geom.Layout.XY, null, this.ends_); + this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_); } else { this.setLayout(opt_layout, coordinates, 2); if (goog.isNull(this.flatCoordinates)) { @@ -135,7 +135,7 @@ ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) { /** - * @param {ol.geom.Layout} layout Layout. + * @param {ol.geom.GeometryLayout} layout Layout. * @param {Array.} flatCoordinates Flat coordinates. * @param {Array.} ends Ends. */ diff --git a/test/spec/ol/geom/linestring.test.js b/test/spec/ol/geom/linestring.test.js index 0c0b510580..78c67739cc 100644 --- a/test/spec/ol/geom/linestring.test.js +++ b/test/spec/ol/geom/linestring.test.js @@ -18,7 +18,7 @@ describe('ol.geom.LineString', function() { }); it('defaults to layout XY', function() { - expect(lineString.getLayout()).to.be(ol.geom.Layout.XY); + expect(lineString.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has empty coordinates', function() { @@ -47,7 +47,7 @@ describe('ol.geom.LineString', function() { }); it('has the expected layout', function() { - expect(lineString.getLayout()).to.be(ol.geom.Layout.XY); + expect(lineString.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has the expected coordinates', function() { @@ -76,7 +76,7 @@ describe('ol.geom.LineString', function() { }); it('has the expected layout', function() { - expect(lineString.getLayout()).to.be(ol.geom.Layout.XYZ); + expect(lineString.getLayout()).to.be(ol.geom.GeometryLayout.XYZ); }); it('has the expected coordinates', function() { @@ -102,11 +102,11 @@ describe('ol.geom.LineString', function() { var lineString; beforeEach(function() { lineString = new ol.geom.LineString( - [[1, 2, 3], [4, 5, 6]], ol.geom.Layout.XYM); + [[1, 2, 3], [4, 5, 6]], ol.geom.GeometryLayout.XYM); }); it('has the expected layout', function() { - expect(lineString.getLayout()).to.be(ol.geom.Layout.XYM); + expect(lineString.getLayout()).to.be(ol.geom.GeometryLayout.XYM); }); it('has the expected coordinates', function() { @@ -135,7 +135,7 @@ describe('ol.geom.LineString', function() { }); it('has the expected layout', function() { - expect(lineString.getLayout()).to.be(ol.geom.Layout.XYZM); + expect(lineString.getLayout()).to.be(ol.geom.GeometryLayout.XYZM); }); it('has the expected coordinates', function() { diff --git a/test/spec/ol/geom/multilinestring.test.js b/test/spec/ol/geom/multilinestring.test.js index 2fa422db75..1b7e67a3f2 100644 --- a/test/spec/ol/geom/multilinestring.test.js +++ b/test/spec/ol/geom/multilinestring.test.js @@ -18,7 +18,7 @@ describe('ol.geom.MultiLineString', function() { }); it('defaults to layout XY', function() { - expect(multiLineString.getLayout()).to.be(ol.geom.Layout.XY); + expect(multiLineString.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has empty coordinates', function() { @@ -48,7 +48,7 @@ describe('ol.geom.MultiLineString', function() { }); it('has the expected layout', function() { - expect(multiLineString.getLayout()).to.be(ol.geom.Layout.XY); + expect(multiLineString.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has the expected coordinates', function() { @@ -80,7 +80,7 @@ describe('ol.geom.MultiLineString', function() { }); it('has the expected layout', function() { - expect(multiLineString.getLayout()).to.be(ol.geom.Layout.XYZ); + expect(multiLineString.getLayout()).to.be(ol.geom.GeometryLayout.XYZ); }); it('has the expected coordinates', function() { @@ -109,11 +109,11 @@ describe('ol.geom.MultiLineString', function() { beforeEach(function() { multiLineString = new ol.geom.MultiLineString( [[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]], - ol.geom.Layout.XYM); + ol.geom.GeometryLayout.XYM); }); it('has the expected layout', function() { - expect(multiLineString.getLayout()).to.be(ol.geom.Layout.XYM); + expect(multiLineString.getLayout()).to.be(ol.geom.GeometryLayout.XYM); }); it('has the expected coordinates', function() { @@ -145,7 +145,7 @@ describe('ol.geom.MultiLineString', function() { }); it('has the expected layout', function() { - expect(multiLineString.getLayout()).to.be(ol.geom.Layout.XYZM); + expect(multiLineString.getLayout()).to.be(ol.geom.GeometryLayout.XYZM); }); it('has the expected coordinates', function() { diff --git a/test/spec/ol/geom/multipoint.test.js b/test/spec/ol/geom/multipoint.test.js index 304e834159..f2ef5bef66 100644 --- a/test/spec/ol/geom/multipoint.test.js +++ b/test/spec/ol/geom/multipoint.test.js @@ -18,7 +18,7 @@ describe('ol.geom.MultiPoint', function() { }); it('defaults to layout XY', function() { - expect(multiPoint.getLayout()).to.be(ol.geom.Layout.XY); + expect(multiPoint.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has empty coordinates', function() { @@ -47,7 +47,7 @@ describe('ol.geom.MultiPoint', function() { }); it('has the expected layout', function() { - expect(multiPoint.getLayout()).to.be(ol.geom.Layout.XY); + expect(multiPoint.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has the expected coordinates', function() { @@ -76,7 +76,7 @@ describe('ol.geom.MultiPoint', function() { }); it('has the expected layout', function() { - expect(multiPoint.getLayout()).to.be(ol.geom.Layout.XYZ); + expect(multiPoint.getLayout()).to.be(ol.geom.GeometryLayout.XYZ); }); it('has the expected coordinates', function() { @@ -102,11 +102,11 @@ describe('ol.geom.MultiPoint', function() { var multiPoint; beforeEach(function() { multiPoint = new ol.geom.MultiPoint( - [[1, 2, 3], [4, 5, 6]], ol.geom.Layout.XYM); + [[1, 2, 3], [4, 5, 6]], ol.geom.GeometryLayout.XYM); }); it('has the expected layout', function() { - expect(multiPoint.getLayout()).to.be(ol.geom.Layout.XYM); + expect(multiPoint.getLayout()).to.be(ol.geom.GeometryLayout.XYM); }); it('has the expected coordinates', function() { @@ -135,7 +135,7 @@ describe('ol.geom.MultiPoint', function() { }); it('has the expected layout', function() { - expect(multiPoint.getLayout()).to.be(ol.geom.Layout.XYZM); + expect(multiPoint.getLayout()).to.be(ol.geom.GeometryLayout.XYZM); }); it('has the expected coordinates', function() { diff --git a/test/spec/ol/geom/point.test.js b/test/spec/ol/geom/point.test.js index 74ff2afad0..72389411ac 100644 --- a/test/spec/ol/geom/point.test.js +++ b/test/spec/ol/geom/point.test.js @@ -18,7 +18,7 @@ describe('ol.geom.Point', function() { }); it('has the expected layout', function() { - expect(point.getLayout()).to.be(ol.geom.Layout.XY); + expect(point.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has the expected coordinates', function() { @@ -43,11 +43,11 @@ describe('ol.geom.Point', function() { var point; beforeEach(function() { - point = new ol.geom.Point([1, 2, 3], ol.geom.Layout.XYM); + point = new ol.geom.Point([1, 2, 3], ol.geom.GeometryLayout.XYM); }); it('has the expected layout', function() { - expect(point.getLayout()).to.be(ol.geom.Layout.XYM); + expect(point.getLayout()).to.be(ol.geom.GeometryLayout.XYM); }); it('has the expected coordinates', function() { @@ -76,7 +76,7 @@ describe('ol.geom.Point', function() { }); it('has the expected layout', function() { - expect(point.getLayout()).to.be(ol.geom.Layout.XYZM); + expect(point.getLayout()).to.be(ol.geom.GeometryLayout.XYZM); }); it('has the expected coordinates', function() { diff --git a/test/spec/ol/geom/polygon.test.js b/test/spec/ol/geom/polygon.test.js index bd53d9f2a0..632888fe63 100644 --- a/test/spec/ol/geom/polygon.test.js +++ b/test/spec/ol/geom/polygon.test.js @@ -20,7 +20,7 @@ describe('ol.geom.Polygon', function() { }); it('defaults to layout XY', function() { - expect(polygon.getLayout()).to.be(ol.geom.Layout.XY); + expect(polygon.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has empty coordinates', function() { @@ -56,7 +56,7 @@ describe('ol.geom.Polygon', function() { }); it('has the expected layout', function() { - expect(polygon.getLayout()).to.be(ol.geom.Layout.XY); + expect(polygon.getLayout()).to.be(ol.geom.GeometryLayout.XY); }); it('has the expected coordinates', function() { @@ -119,7 +119,7 @@ describe('ol.geom.Polygon', function() { }); it('has the expected layout', function() { - expect(polygon.getLayout()).to.be(ol.geom.Layout.XYZ); + expect(polygon.getLayout()).to.be(ol.geom.GeometryLayout.XYZ); }); it('has the expected coordinates', function() { @@ -174,7 +174,8 @@ describe('ol.geom.Polygon', function() { beforeEach(function() { outerRing = [[0, 0, 1], [4, 4, 2], [4, 0, 3]]; innerRing = [[2, 1, 4], [3, 1, 5], [3, 2, 6]]; - polygon = new ol.geom.Polygon([outerRing, innerRing], ol.geom.Layout.XYM); + polygon = new ol.geom.Polygon( + [outerRing, innerRing], ol.geom.GeometryLayout.XYM); flatCoordinates = [0, 0, 1, 4, 4, 2, 4, 0, 3, 2, 1, 4, 3, 1, 5, 3, 2, 6]; outsideOuter = [1, 3]; inside = [3.5, 0.5]; @@ -182,7 +183,7 @@ describe('ol.geom.Polygon', function() { }); it('has the expected layout', function() { - expect(polygon.getLayout()).to.be(ol.geom.Layout.XYM); + expect(polygon.getLayout()).to.be(ol.geom.GeometryLayout.XYM); }); it('has the expected coordinates', function() { @@ -252,7 +253,7 @@ describe('ol.geom.Polygon', function() { }); it('has the expected layout', function() { - expect(polygon.getLayout()).to.be(ol.geom.Layout.XYZM); + expect(polygon.getLayout()).to.be(ol.geom.GeometryLayout.XYZM); }); it('has the expected coordinates', function() {