new demo mode & tenure
Some checks failed
Build and publish Docker image / build-and-push (push) Successful in 8m43s
CI / Check (push) Failing after 8m49s

This commit is contained in:
Andras Schmelczer 2026-06-17 07:54:30 +01:00
parent 7656f24544
commit 4a0f00f2a4
64 changed files with 2875 additions and 338 deletions

View file

@ -63,6 +63,9 @@ const CRIME_OVERLAY_ID: OverlayId = 'crime-hotspots';
export interface UrlState {
viewState: ViewState;
/** True only when the URL carried explicit lat/lon/zoom (shared/dashboard link).
* False on a fresh visit, so the app may centre on the visitor's IP instead. */
hasExplicitView: boolean;
filters: FeatureFilters;
poiCategories: Set<string>;
overlays: Set<OverlayId>;
@ -221,6 +224,7 @@ export function parseUrlState(): UrlState {
const params = new URLSearchParams(window.location.search);
const result: UrlState = {
viewState: INITIAL_VIEW_STATE,
hasExplicitView: false,
filters: parseFilters(params),
poiCategories: new Set(),
overlays: new Set(),
@ -246,6 +250,7 @@ export function parseUrlState(): UrlState {
const zoomN = Number(zoom);
if (!isNaN(latN) && !isNaN(lonN) && !isNaN(zoomN)) {
result.viewState = { latitude: latN, longitude: lonN, zoom: zoomN, pitch: 0 };
result.hasExplicitView = true;
}
}