Differentiate between identity and clone transforms
This commit is contained in:
+11
-2
@@ -93,7 +93,7 @@ ol.Projection.addEquivalentProjections = function(projections) {
|
|||||||
goog.array.forEach(projections, function(source) {
|
goog.array.forEach(projections, function(source) {
|
||||||
goog.array.forEach(projections, function(destination) {
|
goog.array.forEach(projections, function(destination) {
|
||||||
ol.Projection.addTransform(
|
ol.Projection.addTransform(
|
||||||
source, destination, ol.Projection.identityTransform);
|
source, destination, ol.Projection.cloneTransform);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -181,7 +181,7 @@ ol.Projection.equivalent = function(projection1, projection2) {
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
var transform = ol.Projection.getTransform(projection1, projection2);
|
var transform = ol.Projection.getTransform(projection1, projection2);
|
||||||
return transform === ol.Projection.identityTransform;
|
return transform === ol.Projection.cloneTransform;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -219,6 +219,15 @@ ol.Projection.getTransformFromCodes = function(sourceCode, destinationCode) {
|
|||||||
* @return {goog.math.Coordinate} Point.
|
* @return {goog.math.Coordinate} Point.
|
||||||
*/
|
*/
|
||||||
ol.Projection.identityTransform = function(point) {
|
ol.Projection.identityTransform = function(point) {
|
||||||
|
return point;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {goog.math.Coordinate} point Point.
|
||||||
|
* @return {goog.math.Coordinate} Point.
|
||||||
|
*/
|
||||||
|
ol.Projection.cloneTransform = function(point) {
|
||||||
return point.clone();
|
return point.clone();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user