mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(voice): name the outline source that answered
The outline rungs recorded only the credit kind, so the voice area code never saw 'openfreemap' or 'nominatim' and stored every such outline as the Overpass rung, even with no Overpass configured. Voice geometry tagged the source originally; the merge with main kept main's untagged rungs and its test pinning the absence. The tag is restored and the test now asserts it for both sources.
This commit is contained in:
1 parent
552f3de3ff
commit
670e952c29
2 files changed
+5
-1
No files matched your search
@@ -290,6 +290,9 @@ export function createOutlineRungs({
|
||||
const patch = finish(fp, asScope);
|
||||
if (patch?.ring) {
|
||||
patch.outlineCredit = provider === 'openfreemap' ? 'tiles' : 'osm';
|
||||
// Which source answered, so a stored area names it (OpenFreeMap or
|
||||
// Nominatim) instead of defaulting to the Overpass rungs.
|
||||
patch.outlineSource = provider;
|
||||
ctx.credit?.(patch.outlineCredit);
|
||||
// One line per answered outline, like the resolver's own trace.
|
||||
console.log(
|
||||
|
||||
@@ -146,7 +146,7 @@ test('a street comes from tiles before the configured ladder, as merged ribbons'
|
||||
);
|
||||
assert.ok(result.ring.length > 6);
|
||||
assert.equal(result.polygons.length, 1);
|
||||
assert.equal('outlineSource' in result, false);
|
||||
assert.equal(result.outlineSource, 'openfreemap');
|
||||
assert.equal(run.calls.base, 0, 'the ladder is not consulted');
|
||||
assert.deepEqual(run.calls.finished, ['street']);
|
||||
assert.deepEqual(credits, ['tiles']);
|
||||
@@ -416,6 +416,7 @@ test('a city with no configured Overpass is outlined by Nominatim', async () =>
|
||||
);
|
||||
assert.deepEqual(result.ring, ring);
|
||||
assert.equal(result.outlineCredit, 'osm');
|
||||
assert.equal(result.outlineSource, 'nominatim');
|
||||
assert.deepEqual(nominatim.asks[0], {
|
||||
query: 'Toulouse',
|
||||
kind: 'city',
|
||||
|
||||
Reference in new issue
Block a user