Allow optional Street Level provider composition

This commit is contained in:
Sameh Khamis committed 2026-10-09 17:18:49 -07:00
1 parent 6be25595b1
commit 940b277460
10 files changed
+130 -11

No files matched your search

+9 -3
View File
@@ -5,10 +5,16 @@ import * as picking from '../../data/pickRegistry.js';
import * as input from '../../data/inputOwnership.js';
import * as render from '../../renderGovernor.js';
/** A new provider registers here; its chip, credit and share bit follow. */
export function createApplicationStreetLevel({ surface, sources }) {
/** Inject providers, or use Mapillary only when its source is supplied. */
export function createApplicationStreetLevel({
surface,
sources = {},
providers = sources.mapillary == null
? []
: [createMapillaryProvider({ source: sources.mapillary })],
}) {
return createStreetLevelLayer({
providers: [createMapillaryProvider({ source: sources.mapillary })],
providers,
services: {
sprites,
picking,