mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
merge main f13c60c into feat/voice-outlines
reconcile voice outlines with main f13c60c, retaining German/Japanese,
Operator HUD retirement and Context/Radio cleanup, named-building
containment, courtyard-hole, non-Latin identity, attribution, cancellation
and antimeridian repairs
keep outline callouts above the open voice preview when an above-panel
slot fits without colliding with another callout,
and clip the compact dock location label on narrow screens
This commit is contained in:
commit
578ebdc030
449 files changed
+30400
-3429
No files matched your search
@@ -148,6 +148,7 @@ test('a street comes from tiles before the configured ladder, as merged ribbons'
|
||||
assert.equal(run.calls.base, 0, 'the ladder is not consulted');
|
||||
assert.deepEqual(run.calls.finished, ['street']);
|
||||
assert.deepEqual(credits, ['tiles']);
|
||||
assert.equal(result.outlineCredit, 'tiles');
|
||||
assert.equal(tiles.asked[0].zoom, 14);
|
||||
assert.equal(nominatim.asks.length, 0, 'streets never reach Nominatim');
|
||||
});
|
||||
@@ -180,6 +181,7 @@ test('"circle this building" picks the tile building at the point first', async
|
||||
run,
|
||||
);
|
||||
assert.equal(result.footprintKind, 'building');
|
||||
assert.equal(result.outlineCredit, 'tiles');
|
||||
assert.equal(run.calls.base, 0);
|
||||
assert.equal(nominatim.asks.length, 0);
|
||||
const primary = [square(CAPITOL.lat, CAPITOL.lon, 0.0002)];
|
||||
@@ -208,8 +210,8 @@ test('"circle this building" picks the tile building at the point first', async
|
||||
);
|
||||
assert.deepEqual(
|
||||
multipart.polygons,
|
||||
[primary, other],
|
||||
'the building rung retains all feature parts',
|
||||
[primary],
|
||||
'the building rung retains the selected component, not unrelated siblings',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -229,6 +231,64 @@ test('a named building asks Nominatim, then falls back to the tile building', as
|
||||
assert.equal(result.footprintKind, 'building');
|
||||
});
|
||||
|
||||
test('named building tile fallbacks require the anchor in filled geometry', async () => {
|
||||
const nearby = {
|
||||
anchor: { lat: 0, lon: 0.00035 },
|
||||
rings: [square(0, 0, 0.0001)],
|
||||
};
|
||||
for (const { anchor, rings } of [
|
||||
nearby,
|
||||
{
|
||||
anchor: { lat: 0, lon: 0 },
|
||||
rings: [square(0, 0, 0.001), square(0, 0, 0.0002)],
|
||||
},
|
||||
]) {
|
||||
const credits = [];
|
||||
const run = ladder(UNAVAILABLE);
|
||||
const result = await createOutlineRungs({
|
||||
tiles: {
|
||||
fetchBounds: async () => ({
|
||||
tiles: [{ buildings: [{ rings, heightM: null }] }],
|
||||
}),
|
||||
},
|
||||
nominatim: fakeNominatim(null),
|
||||
}).resolve(
|
||||
ctx({
|
||||
...anchor,
|
||||
view: anchor,
|
||||
scope: 'building',
|
||||
target: 'Gateville',
|
||||
matchName: 'Gateville',
|
||||
credit: (kind) => credits.push(kind),
|
||||
}),
|
||||
run,
|
||||
);
|
||||
assert.equal(result, UNAVAILABLE);
|
||||
assert.deepEqual(run.calls.finished, []);
|
||||
assert.deepEqual(credits, []);
|
||||
}
|
||||
|
||||
const pointed = await createOutlineRungs({
|
||||
tiles: {
|
||||
fetchBounds: async () => ({
|
||||
tiles: [{ buildings: [{ rings: nearby.rings, heightM: null }] }],
|
||||
}),
|
||||
},
|
||||
nominatim: fakeNominatim(null),
|
||||
}).resolve(
|
||||
ctx({
|
||||
...nearby.anchor,
|
||||
view: nearby.anchor,
|
||||
scope: 'building',
|
||||
target: 'this building',
|
||||
fromName: false,
|
||||
}),
|
||||
ladder(UNAVAILABLE),
|
||||
);
|
||||
assert.equal(pointed.footprintKind, 'building');
|
||||
assert.equal(pointed.outlineCredit, 'tiles');
|
||||
});
|
||||
|
||||
test('a city with no configured Overpass is outlined by Nominatim', async () => {
|
||||
const ring = square(43.6, 1.44, 0.05);
|
||||
const nominatim = fakeNominatim({ polygons: [[ring]], class: 'boundary' });
|
||||
@@ -249,6 +309,7 @@ test('a city with no configured Overpass is outlined by Nominatim', async () =>
|
||||
run,
|
||||
);
|
||||
assert.deepEqual(result.ring, ring);
|
||||
assert.equal(result.outlineCredit, 'osm');
|
||||
assert.deepEqual(nominatim.asks[0], {
|
||||
query: 'Toulouse',
|
||||
kind: 'city',
|
||||
@@ -721,6 +782,10 @@ test('default settings: outline, street and building asks send nothing to Overpa
|
||||
target: 'this building',
|
||||
});
|
||||
assert.equal(building.outline?.footprintKind, 'building');
|
||||
assert.equal(building.outline.outlineCredit, 'tiles');
|
||||
assert.equal(street.outline.outlineCredit, 'tiles');
|
||||
assert.equal(paris.outline.outlineCredit, 'osm');
|
||||
assert.equal(park.outline.outlineCredit, 'osm');
|
||||
|
||||
assert.ok(
|
||||
upstream.every((url) =>
|
||||
|
||||
Reference in new issue
Block a user