SourceTermAnalysisSystem_vue/node_modules/.vite/deps/chunk-SQ4UGRSZ.js
2026-05-15 10:22:44 +08:00

46 lines
999 B
JavaScript

// node_modules/ol/tilecoord.js
function createOrUpdate(z, x, y, tileCoord) {
if (tileCoord !== void 0) {
tileCoord[0] = z;
tileCoord[1] = x;
tileCoord[2] = y;
return tileCoord;
}
return [z, x, y];
}
function getKeyZXY(z, x, y) {
return z + "/" + x + "/" + y;
}
function getKey(tileCoord) {
return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);
}
function hash(tileCoord) {
return hashZXY(tileCoord[0], tileCoord[1], tileCoord[2]);
}
function hashZXY(z, x, y) {
return (x << z) + y;
}
function withinExtentAndZ(tileCoord, tileGrid) {
const z = tileCoord[0];
const x = tileCoord[1];
const y = tileCoord[2];
if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {
return false;
}
const tileRange = tileGrid.getFullTileRange(z);
if (!tileRange) {
return true;
}
return tileRange.containsXY(x, y);
}
export {
createOrUpdate,
getKeyZXY,
getKey,
hash,
hashZXY,
withinExtentAndZ
};
//# sourceMappingURL=chunk-SQ4UGRSZ.js.map