Rename ol.geom.Layout to ol.geom.GeometryLayout
This commit is contained in:
@@ -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.<number>} 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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.<number>} flatCoordinates Flat coordinates.
|
||||
*/
|
||||
ol.geom.LineString.prototype.setFlatCoordinates =
|
||||
|
||||
@@ -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.<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array.<number>} ends Ends.
|
||||
*/
|
||||
|
||||
@@ -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.<number>} flatCoordinates Flat coordinates.
|
||||
*/
|
||||
ol.geom.MultiPoint.prototype.setFlatCoordinates =
|
||||
|
||||
@@ -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.<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array.<Array.<number>>} endss Endss.
|
||||
*/
|
||||
|
||||
@@ -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.<number>} flatCoordinates Flat coordinates.
|
||||
*/
|
||||
ol.geom.Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||
|
||||
@@ -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.<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array.<number>} ends Ends.
|
||||
*/
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user