#805 - all geometries now know how to rotate - see the examples/rotate-features.html for geometry.rotate in action
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3602 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -245,6 +245,21 @@ OpenLayers.Geometry.Collection.prototype =
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: rotate
|
||||
* Rotate a geometry around some origin
|
||||
*
|
||||
* Parameters:
|
||||
* angle - {Float} Rotation angle in radians (measured counterclockwise
|
||||
* from the positive x-axis)
|
||||
* origin - {OpenLayers.Geometry.Point} Center point for the rotation
|
||||
*/
|
||||
rotate: function(angle, origin) {
|
||||
for(var i=0; i<this.components.length; ++i) {
|
||||
this.components[i].rotate(angle, origin);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: equals
|
||||
* Tests for equivalent geometries
|
||||
|
||||
Reference in New Issue
Block a user