Fix comparison of projections with same code but different units

This commit is contained in:
Andreas Hocevar
2015-10-05 22:52:14 +02:00
parent 4784b7f2e2
commit 66338a662d
2 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -677,7 +677,8 @@ ol.proj.get = function(projectionLike) {
ol.proj.equivalent = function(projection1, projection2) {
if (projection1 === projection2) {
return true;
} else if (projection1.getCode() === projection2.getCode()) {
} else if (projection1.getCode() === projection2.getCode() &&
projection1.getUnits() === projection2.getUnits()) {
return true;
} else if (projection1.getUnits() != projection2.getUnits()) {
return false;