Merge pull request #1487 from fredj/cleanup
ol.TileCoord: add @struct annotation and use the ol.TileCoord.createOrUpdate function
This commit is contained in:
@@ -21,6 +21,7 @@ ol.QuadKeyCharCode = {
|
|||||||
* @param {number} z Zoom level.
|
* @param {number} z Zoom level.
|
||||||
* @param {number} x X.
|
* @param {number} x X.
|
||||||
* @param {number} y Y.
|
* @param {number} y Y.
|
||||||
|
* @struct
|
||||||
*/
|
*/
|
||||||
ol.TileCoord = function(z, x, y) {
|
ol.TileCoord = function(z, x, y) {
|
||||||
|
|
||||||
|
|||||||
@@ -89,14 +89,7 @@ ol.tilegrid.XYZ.prototype.createTileCoordTransform = function(opt_options) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (goog.isDef(opt_tileCoord)) {
|
return ol.TileCoord.createOrUpdate(z, x, -y - 1, 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);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -74,13 +74,6 @@ ol.tilegrid.Zoomify.prototype.createTileCoordTransform = function(opt_options) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (goog.isDef(opt_tileCoord)) {
|
return ol.TileCoord.createOrUpdate(z, x, -y - 1, 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);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user