Simplify ol.proj.addCoordinateTransforms
Equivalent projections do not need to be handled here, and the forward and inverse functions can be function arguments instead of being nested in an object literal.
This commit is contained in:
@@ -274,33 +274,6 @@ olx.OverlayOptions.prototype.stopEvent;
|
||||
olx.OverlayOptions.prototype.insertFirst;
|
||||
|
||||
|
||||
/**
|
||||
* Object literal with forward and inverse coordinate transforms.
|
||||
* @typedef {{forward: function(ol.Coordinate): ol.Coordinate,
|
||||
* inverse: function(ol.Coordinate): ol.Coordinate}}
|
||||
* @api
|
||||
*/
|
||||
olx.CoordinateTransforms;
|
||||
|
||||
|
||||
/**
|
||||
* The forward transform function (that is, from the source projection to the
|
||||
* target projection) that takes a {@link ol.Coordinate} as argument
|
||||
* and returns the transformed {@link ol.Coordinate}.
|
||||
* @type {function(ol.Coordinate): ol.Coordinate}
|
||||
*/
|
||||
olx.CoordinateTransforms.prototype.forward;
|
||||
|
||||
|
||||
/**
|
||||
* The inverse transform function (that is, from the target projection to the
|
||||
* source projection) that takes a {@link ol.Coordinate} as argument
|
||||
* and returns the transformed {@link ol.Coordinate}.
|
||||
* @type {function(ol.Coordinate): ol.Coordinate}
|
||||
*/
|
||||
olx.CoordinateTransforms.prototype.inverse;
|
||||
|
||||
|
||||
/**
|
||||
* Object literal with config options for the projection.
|
||||
* @typedef {{code: string,
|
||||
|
||||
+5
-2
@@ -5,9 +5,12 @@
|
||||
|
||||
|
||||
/**
|
||||
* @type {Function}
|
||||
* @param {...*} var_args
|
||||
* @return {undefined|Array.<number>|Object.<{
|
||||
* forward: function(Array.<number>): Array.<number>,
|
||||
* inverse: function(Array.<number>): Array.<number>}>}
|
||||
*/
|
||||
var proj4 = function() {};
|
||||
var proj4 = function(var_args) {};
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user