#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:
Tim Schaub
2007-07-05 22:03:27 +00:00
parent debca7c477
commit dcffa03e7d
6 changed files with 207 additions and 0 deletions

View File

@@ -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