Improve videos

This commit is contained in:
Andras Schmelczer 2026-06-10 21:28:19 +01:00
parent 4012e4e047
commit d3418c67cc
11 changed files with 988 additions and 869 deletions

View file

@ -13,6 +13,15 @@ export function dashboardUrl(storyboard: Storyboard): string {
lon: String(view.lon),
zoom: String(view.zoom),
});
// Cold-open filters: applied through the URL so the first frame already
// shows a filtered map. Numeric features use name:min:max, enums name:a|b.
for (const [name, value] of Object.entries(storyboard.content.initialFilters ?? {})) {
const entry =
typeof value[0] === 'number'
? `${name}:${value[0]}:${value[1]}`
: `${name}:${(value as string[]).join('|')}`;
params.append('filter', entry);
}
for (const tt of storyboard.content.stubbedTravelTimeFilters) {
params.append('tt', `${tt.mode}:${tt.slug}:${tt.label}:${tt.min ?? 0}:${tt.max ?? 120}`);
}