Preserve custom Street Level provider switches in shared state

This commit is contained in:
Sameh Khamis committed 2026-10-09 17:53:47 -07:00
1 parent 3b840ebdf3
commit 7b1b2df764
11 files changed
+238 -9

No files matched your search

+4
View File
@@ -1,3 +1,5 @@
import { encodeProviderSwitches } from './providerSwitches.js';
/**
* The contract an imagery provider registers with the Street Level layer.
*
@@ -125,6 +127,8 @@ export function validateProviders(providers) {
ids.add(provider.id);
prefixes.push(provider.pickPrefix);
}
// Validate the complete bounded share field once, before any instance exists.
encodeProviderSwitches(providers.map(({ id }) => [id, true]));
return Object.freeze([...providers]);
}