diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 3b3834d704..b12a260d44 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -51,8 +51,10 @@ ol.geom.CoordinateArray; ol.geom.GeometryType = { POINT: 'point', LINESTRING: 'linestring', + LINEARRING: 'linearring', POLYGON: 'polygon', MULTIPOINT: 'multipoint', MULTILINESTRING: 'multilinestring', - MULTIPOLYGON: 'multipolygon' + MULTIPOLYGON: 'multipolygon', + GEOMETRYCOLLECTION: 'geometrycollection' }; diff --git a/src/ol/geom/geometrycollection.js b/src/ol/geom/geometrycollection.js index 4ff6dd6372..4513b171a9 100644 --- a/src/ol/geom/geometrycollection.js +++ b/src/ol/geom/geometrycollection.js @@ -3,6 +3,7 @@ goog.provide('ol.geom.GeometryCollection'); goog.require('goog.asserts'); goog.require('ol.Extent'); goog.require('ol.geom.Geometry'); +goog.require('ol.geom.GeometryType'); @@ -57,3 +58,11 @@ ol.geom.GeometryCollection.prototype.getBounds = function() { } return this.bounds; }; + + +/** + * @inheritDoc + */ +ol.geom.GeometryCollection.prototype.getType = function() { + return ol.geom.GeometryType.GEOMETRYCOLLECTION; +}; diff --git a/src/ol/geom/linearring.js b/src/ol/geom/linearring.js index 63fda9fe95..92d181e6e0 100644 --- a/src/ol/geom/linearring.js +++ b/src/ol/geom/linearring.js @@ -1,8 +1,7 @@ goog.provide('ol.geom.LinearRing'); -goog.require('goog.asserts'); -goog.require('goog.vec.Float64Array'); goog.require('ol.geom.CoordinateArray'); +goog.require('ol.geom.GeometryType'); goog.require('ol.geom.LineString'); @@ -25,3 +24,11 @@ ol.geom.LinearRing = function(coordinates) { }; goog.inherits(ol.geom.LinearRing, ol.geom.LineString); + + +/** + * @inheritDoc + */ +ol.geom.LinearRing.prototype.getType = function() { + return ol.geom.GeometryType.GEOMETRYCOLLECTION; +};