mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
Traffic roads come from OpenFreeMap vector tiles, or TomTom flow tiles with a key (Hybrid by default). Military areas use OpenFreeMap polygons with a bundled worldwide name index; wide views show named points. ALPR reads an hourly OpenStreetMap extract. Cockpit place context and country, state and US county outlines use bundled Natural Earth and US Census data. Overpass is used only when an operator configures their own endpoint. Also: camera arrivals no longer land below ground, keyless terrain retries on 429, bounded relation geometry for configured Overpass, one shared OpenStreetMap credit, and separate tile and API transports for embedders. Co-authored-by: theGaryLarson <[email protected]> Co-authored-by: Milan Khanal <[email protected]>
This commit is contained in:
200 files changed
+26665
-1977
No files matched your search
@@ -1631,6 +1631,20 @@ test('installation summaries disclose viewport-scoped coverage', () => {
|
||||
assert.equal(retrying.reason, 'Overpass temporarily unavailable — retrying in 30s');
|
||||
});
|
||||
|
||||
test('installation summaries name a subject window instead of the viewport', () => {
|
||||
const stats = { coverage: { kind: 'subject', radiusM: 100_000 } };
|
||||
const empty = summarizeInstallationViewport([], { available: true, stale: false, stats });
|
||||
assert.equal(empty.count, 0);
|
||||
assert.match(empty.reason, /none mapped within 100 km/);
|
||||
assert.match(empty.reason, /not a complete 250 km survey/);
|
||||
const found = summarizeInstallationViewport(
|
||||
[{ id: 'ofm:installation:1', label: 'Military area', distanceM: 1200 }],
|
||||
{ available: true, stale: false, stats },
|
||||
);
|
||||
assert.equal(found.count, 1);
|
||||
assert.equal(found.reason, 'mapped matches within 100 km of the subject');
|
||||
});
|
||||
|
||||
test('compact Context snapshots retain installation coverage', () => {
|
||||
const snapshot = buildAwarenessContextSnapshot({
|
||||
subject: { layerId: 'flights', id: 'abc' },
|
||||
@@ -3060,3 +3074,27 @@ test('a moving camera refreshes Contacts more than once inside one parked interv
|
||||
restoreCollections();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
test('a selected installation card keeps every member name and escapes source text', () => {
|
||||
const runtime = installAwarenessRuntime();
|
||||
const restores = [];
|
||||
try {
|
||||
for (const layer of [aisLiveVesselsLayer, flightsLayer, militaryFlightsLayer, militaryInstallationsLayer])
|
||||
replaceMethod(layer, 'getNearby', () => [], restores);
|
||||
militaryAwarenessLayer.setParams({ passive: false });
|
||||
runtime.dispatch('gev:entity-selected', {
|
||||
layerId: 'military-installations', id: 'osm:military:w1', label: 'Parent base',
|
||||
latitude: 31.13, longitude: -97.78,
|
||||
properties: { memberNames: ['Area one', 'Area two', 'Area three', '<Area four>'] },
|
||||
});
|
||||
militaryAwarenessLayer.update();
|
||||
const html = runtime.panel().innerHTML;
|
||||
assert.match(html, /Named areas \(4\)/);
|
||||
for (const name of ['Area one', 'Area two', 'Area three', '<Area four>']) assert.ok(html.includes(name));
|
||||
assert.ok(!html.includes('<Area four>'));
|
||||
} finally {
|
||||
restores.reverse().forEach((restore) => restore());
|
||||
runtime.restore();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user