mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 13:52:19 +00:00
Preserve custom Street Level provider switches in shared state
This commit is contained in:
1 parent
3b840ebdf3
commit
7b1b2df764
11 files changed
+238
-9
No files matched your search
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user