Make transform functions work with arrays
Instead of working with ol.Coordinate instances, transform functions work with arrays. This is in anticipation of using transform functions to transform large arrays of vertex coordinate values. The ol.projection.transform and ol.projection.transformWithCodes are slightly more convenient functions for dealing with ol.Coordinate instances. Whether we make this more consistent with the use of functions returned by ol.projection.getTransform is up for discussion.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
goog.provide('ol.TransformFunction');
|
||||
|
||||
goog.require('ol.Coordinate');
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {function(ol.Coordinate): ol.Coordinate}
|
||||
* A transform function accepts an array of input coordinate values and an
|
||||
* optional dimension (default should be 2). The function transforms the
|
||||
* coordinate values and returns an array of the same length as the input.
|
||||
*
|
||||
* @typedef {function(Array.<number>, number=): Array.<number>}
|
||||
*/
|
||||
ol.TransformFunction;
|
||||
|
||||
Reference in New Issue
Block a user