Add new ol.geom.Geometry#rotate function

This commit is contained in:
Frederic Junod
2016-03-07 15:27:55 +01:00
parent 6c74e90c5d
commit d5564a04db
5 changed files with 117 additions and 0 deletions
+13
View File
@@ -231,6 +231,19 @@ ol.geom.GeometryCollection.prototype.isEmpty = function() {
};
/**
* @inheritDoc
* @api
*/
ol.geom.GeometryCollection.prototype.rotate = function(angle, anchor) {
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
geometries[i].rotate(angle, anchor);
}
this.changed();
};
/**
* Set the geometries that make up this geometry collection.
* @param {Array.<ol.geom.Geometry>} geometries Geometries.