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:
manjunath committed 2026-10-27 13:24:02 +00:00
commit d4434aa6d7
1489 files changed
+196442 -12353

No files matched your search

+35 -15
View File
@@ -1,8 +1,10 @@
import { createDirectionsSource } from '../layers/directions/source.js';
import { createRecentImagerySource } from '../layers/recentImagery/source.js';
import { createOpenFreeMapSource } from '../sources/openFreeMap.js';
import {
createOpenSkySource,
createAdsbLolSource,
createAisStreamSource,
createFlightSource,
createMilitarySource,
createVesselSource,
} from '../sources/live/standalone.js';
import { createCctvSource } from '../layers/cctv/source.js';
import { createRadioSource } from '../layers/radio/source.js';
@@ -17,23 +19,32 @@ import { createWeatherSource } from '../layers/weather/source.js';
import { createCycloneSource } from '../layers/cyclones/source.js';
import { createWindSource } from '../layers/wind/source.js';
import { createFirmsSource } from '../layers/firms/source.js';
import { createGhostMapsSource } from '../layers/ghostMaps/source.js';
import { createMapillarySource } from '../layers/streetLevel/providers/mapillary/source.js';
import { createReferenceSources } from '../sources/reference.js';
export { createReferenceSources as createStandaloneReferenceSources } from '../sources/reference.js';
/** Select standalone providers without starting their acquisition. */
export function createStandaloneLayerSources({
createMapTiles = createOpenFreeMapSource,
} = {}) {
// Each subsystem owns its own request lifetime and local result cache. The
// sources still share the bounded decoded-tile owner inside OpenFreeMap.
const trafficTiles = createMapTiles();
const installationTiles = createMapTiles();
return {
export function createStandaloneLayerSources(
overrides = {},
{ createMapTiles = createOpenFreeMapSource } = {},
) {
if (!overrides || typeof overrides !== 'object' || Array.isArray(overrides))
throw new TypeError('Source overrides must be an object');
const trafficTiles = createMapTiles({
selectDecoded: ({ roads }) => ({ roads }),
});
const installationTiles = createMapTiles({
selectDecoded: ({ military }) => ({ military }),
});
const defaults = {
...createReferenceSources(),
flights: createOpenSkySource(),
military: createAdsbLolSource(),
vessels: createAisStreamSource({
apiUrl: import.meta.env?.VITE_AIS_LIVE_API_URL || '/api/ais-live',
directions: createDirectionsSource(),
'recent-imagery': createRecentImagerySource(),
flights: createFlightSource(),
military: createMilitarySource(),
vessels: createVesselSource({
apiUrl: import.meta.env?.VITE_AIS_LIVE_API_URL || '/api/vessels',
// Resolved against the document's address, which a panel host may
// serve from its own scheme.
origin: () => globalThis.document?.baseURI ?? 'http://localhost',
@@ -48,8 +59,17 @@ export function createStandaloneLayerSources({
launches: createLaunchSource(),
alpr: createAlprTileSource(),
firms: createFirmsSource(),
's2-ghostmaps': createGhostMapsSource(),
wind: createWindSource(),
weather: createWeatherSource(),
cyclones: createCycloneSource(),
mapillary: createMapillarySource({
token: import.meta.env?.MAPILLARY_CLIENT_TOKEN || '',
}),
};
for (const name of Object.keys(overrides)) {
if (!Object.hasOwn(defaults, name))
throw new TypeError(`Unknown source: ${name}`);
}
return { ...defaults, ...overrides };
}