Disallowing mixed geometry collections for now
This commit is contained in:
@@ -7,8 +7,8 @@ goog.require('ol.geom.Geometry');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A mixed collection of geometries. This constructor is typically not called
|
* A collection of geometries. This constructor should not called. Instead
|
||||||
* directly. Instead call @see ol.geom.GeometryCollection#fromGeometries.
|
* create one of the fixed type collections.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {ol.geom.Geometry}
|
* @implements {ol.geom.Geometry}
|
||||||
*/
|
*/
|
||||||
@@ -57,14 +57,3 @@ ol.geom.GeometryCollection.prototype.getBounds = function() {
|
|||||||
}
|
}
|
||||||
return this.bounds;
|
return this.bounds;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Array.<ol.geom.Geometry>} components Array of geometries.
|
|
||||||
* @return {ol.geom.GeometryCollection} A mixed geometry collection.
|
|
||||||
*/
|
|
||||||
ol.geom.GeometryCollection.fromGeometries = function(components) {
|
|
||||||
var collection = new ol.geom.GeometryCollection();
|
|
||||||
collection.components = components;
|
|
||||||
return collection;
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user