Add a method to scale geometries
This commit is contained in:
@@ -180,6 +180,20 @@ ol.geom.Geometry.prototype.getExtent = function(opt_extent) {
|
||||
ol.geom.Geometry.prototype.rotate = function(angle, anchor) {};
|
||||
|
||||
|
||||
/**
|
||||
* Scale the geometry (with an optional origin). This modifies the geometry
|
||||
* coordinates in place.
|
||||
* @abstract
|
||||
* @param {number} sx The scaling factor in the x-direction.
|
||||
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
|
||||
* sx).
|
||||
* @param {ol.Coordinate=} opt_anchor The scale origin (defaults to the center
|
||||
* of the geometry extent).
|
||||
* @api
|
||||
*/
|
||||
ol.geom.Geometry.prototype.scale = function(sx, opt_sy, opt_anchor) {};
|
||||
|
||||
|
||||
/**
|
||||
* Create a simplified version of this geometry. For linestrings, this uses
|
||||
* the the {@link
|
||||
|
||||
Reference in New Issue
Block a user