Use ol.TileCoord.createOrUpdate function

This commit is contained in:
Frederic Junod
2014-01-08 11:38:12 +01:00
parent 4e4e3c24b4
commit 8c61dbef8a
2 changed files with 2 additions and 16 deletions

View File

@@ -89,14 +89,7 @@ ol.tilegrid.XYZ.prototype.createTileCoordTransform = function(opt_options) {
return null;
}
}
if (goog.isDef(opt_tileCoord)) {
opt_tileCoord.z = z;
opt_tileCoord.x = x;
opt_tileCoord.y = -y - 1;
return opt_tileCoord;
} else {
return new ol.TileCoord(z, x, -y - 1);
}
return ol.TileCoord.createOrUpdate(z, x, -y - 1, opt_tileCoord);
});
};

View File

@@ -74,13 +74,6 @@ ol.tilegrid.Zoomify.prototype.createTileCoordTransform = function(opt_options) {
return null;
}
}
if (goog.isDef(opt_tileCoord)) {
opt_tileCoord.z = z;
opt_tileCoord.x = x;
opt_tileCoord.y = -y - 1;
return opt_tileCoord;
} else {
return new ol.TileCoord(z, x, -y - 1);
}
return ol.TileCoord.createOrUpdate(z, x, -y - 1, opt_tileCoord);
});
};