refactor(street-level): rename the Mapillary layer to street-level

Pure move: the layer id, panel id, CSS prefix, classes, exports and config
paths become provider-neutral (street-level, #street-level-panel, sl-);
the Mapillary-specific modules move under providers/mapillary/. Behaviour
is unchanged. The two sprite collections now register under distinct ids
instead of overwriting each other under 'mapillary'.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Said TurkseverandClaude Fable 5.1 committed 2026-09-25 18:13:53 +01:00
1 parent 547b706f67
commit 2dbc684fb1
38 files changed
+401 -381

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
/** Mutable per-layer state, created once per layer instance. */
export function createState({ services }) {
return {
services,
viewer: null,
enabled: false,
initialized: false,
destroyed: false,
status: null,
statusError: null,
keyRequired: false,
/** Cesium.Credit shown while enabled (CC BY-SA attribution). */
credit: null,
listeners: new Set(),
notifyScheduled: false,
coverage: {
zoom: null,
/** @type {Map<string, {primitive: object|null, sequences: Map<string, object>, count: number}>} */
tiles: new Map(),
/** Tiles from the previous zoom, kept on screen until replacements land. */
stale: new Map(),
staleTimer: null,
pending: new Map(),
generation: 0,
loading: 0,
lastError: null,
debounceTimer: null,
removeCameraListener: null,
terrainReady: null,
hint: '',
kind: null,
filter: { pano: 'all', sinceMs: null },
},
sequence: {
selectedId: null,
images: [],
/** @type {Map<string, Array<object>>} recent sequences' thinned images */
cache: new Map(),
collection: null,
loading: false,
abort: null,
},
street: {
bridge: null,
container: null,
open: false,
follow: false,
imageId: null,
position: null,
bearing: null,
tilt: null,
isPano: false,
capturedAt: null,
sequenceId: null,
loading: false,
error: null,
marker: null,
markerCollection: null,
/** 'letterbox' shows the whole image; 'fill' crops it to the frame. */
renderMode: 'letterbox',
},
clickHandler: null,
};
}