mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
feat(outlines): restore voice outlines without public Overpass
use bundled place boundaries and shared OpenFreeMap tiles before a guarded Nominatim fallback preserve multipart shapes, holes and cancellation, and keep pending annotations visible while ground sampling finishes across frames keep non-Latin name distinctions when selecting provider results, and retain an outline anchor only when it lies in filled geometry
This commit is contained in:
commit
d4434aa6d7
1489 files changed
+196442
-12353
No files matched your search
@@ -4,25 +4,38 @@ import { createStandaloneLayerSources } from './layerSources.js';
|
||||
|
||||
test('traffic and installations own separate local OpenFreeMap lifetimes', () => {
|
||||
const mapTiles = [];
|
||||
const sources = createStandaloneLayerSources({
|
||||
createMapTiles() {
|
||||
const source = {
|
||||
clears: 0,
|
||||
clear() {
|
||||
this.clears++;
|
||||
},
|
||||
getMetadata: async () => ({
|
||||
template: 'https://tiles.openfreemap.org/planet/test/{z}/{x}/{y}.pbf',
|
||||
}),
|
||||
fetchBounds: async () => ({ tiles: [], loadedTiles: [] }),
|
||||
};
|
||||
mapTiles.push(source);
|
||||
return source;
|
||||
const mapTileOptions = [];
|
||||
const sources = createStandaloneLayerSources(
|
||||
{},
|
||||
{
|
||||
createMapTiles(options) {
|
||||
mapTileOptions.push(options);
|
||||
const source = {
|
||||
clears: 0,
|
||||
clear() {
|
||||
this.clears++;
|
||||
},
|
||||
getMetadata: async () => ({
|
||||
template:
|
||||
'https://tiles.openfreemap.org/planet/test/{z}/{x}/{y}.pbf',
|
||||
}),
|
||||
fetchBounds: async () => ({ tiles: [], loadedTiles: [] }),
|
||||
};
|
||||
mapTiles.push(source);
|
||||
return source;
|
||||
},
|
||||
},
|
||||
});
|
||||
);
|
||||
|
||||
assert.equal(mapTiles.length, 2);
|
||||
assert.notEqual(mapTiles[0], mapTiles[1]);
|
||||
const decoded = { roads: ['road'], military: ['site'] };
|
||||
assert.deepEqual(mapTileOptions[0].selectDecoded(decoded), {
|
||||
roads: ['road'],
|
||||
});
|
||||
assert.deepEqual(mapTileOptions[1].selectDecoded(decoded), {
|
||||
military: ['site'],
|
||||
});
|
||||
sources.traffic.resetFlowTileCache();
|
||||
assert.deepEqual(
|
||||
mapTiles.map((source) => source.clears),
|
||||
|
||||
Reference in new issue
Block a user