mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
Fix Data Library share restore, dense tile layers and EPC partition reads
- Share links: the compact /share/<code> format carries the switched-on library entries (field 29), so Copy Link keeps them; a share opened in the same tab restores them; any share decides what is on, so one with every library entry off no longer switches on the recipient's stored entries. - A tile entry too dense at its minimum zoom (Norway cadastre z14, depth z11) is hidden below that scale via minimumTerrainLevel instead of allocating millions of tiles when zoomed out. - EPC partitions keep the full extent for exclusion and the 98 % extent for ranking only; the old trimmed-only extents are retired. - Partition index footers that fail transiently are retried; an incomplete index is never cached as complete, a complete prior index is kept, and it is rebuilt after five minutes. - Views that leave touching partitions unread are partial; listing and footer bodies are capped and ranges validated. - The Browse dialog relabels after a language switch.
This commit is contained in:
1 parent
871b7f0fcc
commit
24ccdd4dc3
20 files changed
+1220
-162
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import * as Cesium from 'cesium';
|
||||
import { createLibraryTileLayer } from './layers.js';
|
||||
import { createLibraryTileLayer, minimumTerrainLevelFor } from './layers.js';
|
||||
import { LIBRARY_ENTRIES, libraryEntry } from './catalog.js';
|
||||
import { libraryTileUrl } from './manifest.js';
|
||||
import { createLibrarySource } from './source.js';
|
||||
@@ -133,3 +133,35 @@ test('bbox and TMS templates become the URLs Cesium and the proxy request', () =
|
||||
'https://t.example.org/3/2/6.png',
|
||||
);
|
||||
});
|
||||
|
||||
test('an entry too dense to draw zoomed out is hidden below its scale', async () => {
|
||||
const cadastre = entryWithoutOutline('kartverket-cadastre');
|
||||
assert.equal(cadastre.source.minZoom, 14);
|
||||
assert.equal(minimumTerrainLevelFor(cadastre), 13);
|
||||
// Small coverage, or a low minimum zoom, draws at every scale.
|
||||
assert.equal(
|
||||
minimumTerrainLevelFor(libraryEntry('lee-county-fl')),
|
||||
undefined,
|
||||
);
|
||||
assert.equal(
|
||||
minimumTerrainLevelFor(libraryEntry('ign-orthophotos-france')),
|
||||
undefined,
|
||||
);
|
||||
|
||||
// Switched on zoomed out, then zoomed further out: no globe tile coarser
|
||||
// than level 13 takes imagery from it, so no z14 tile is ever requested.
|
||||
const viewer = globeViewer();
|
||||
const layer = createLibraryTileLayer(cadastre, { source, cesium: Cesium });
|
||||
await layer.init(viewer);
|
||||
await layer.enable(viewer);
|
||||
const imagery = viewer.imageryLayers.get(viewer.imageryLayers.length - 1);
|
||||
const terrain = new Cesium.EllipsoidTerrainProvider();
|
||||
for (const level of [0, 4, 12])
|
||||
assert.equal(
|
||||
imagery._createTileImagerySkeletons({ level, data: {} }, terrain),
|
||||
false,
|
||||
`globe level ${level} takes no cadastre imagery`,
|
||||
);
|
||||
await layer.disable();
|
||||
assert.equal(viewer.imageryLayers.length, 0);
|
||||
});
|
||||
Reference in new issue
Block a user