default overlay
This commit is contained in:
parent
18ace123dc
commit
2924209898
1 changed files with 9 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ export interface OverlayDefinition {
|
||||||
label: string;
|
label: string;
|
||||||
description: string;
|
description: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
|
/** Enabled on a fresh visit (no `overlay` URL params). */
|
||||||
|
defaultEnabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const OVERLAYS: OverlayDefinition[] = [
|
export const OVERLAYS: OverlayDefinition[] = [
|
||||||
|
|
@ -28,6 +30,7 @@ export const OVERLAYS: OverlayDefinition[] = [
|
||||||
description: 'Approximate police.uk street-crime heatmap',
|
description: 'Approximate police.uk street-crime heatmap',
|
||||||
detail:
|
detail:
|
||||||
'Client-side heatmap of street-level crimes published by police.uk over the most recent months. Police.uk coordinates are anonymised snap-to-grid points, not exact offence locations, so the heatmap should be read as an approximation of relative density rather than a precise map of incidents.',
|
'Client-side heatmap of street-level crimes published by police.uk over the most recent months. Police.uk coordinates are anonymised snap-to-grid points, not exact offence locations, so the heatmap should be read as an approximation of relative density rather than a precise map of incidents.',
|
||||||
|
defaultEnabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'trees-outside-woodlands',
|
id: 'trees-outside-woodlands',
|
||||||
|
|
@ -35,6 +38,7 @@ export const OVERLAYS: OverlayDefinition[] = [
|
||||||
description: 'Tree canopy and woodland polygons',
|
description: 'Tree canopy and woodland polygons',
|
||||||
detail:
|
detail:
|
||||||
'Forest Research Trees Outside Woodland (TOW) v1 canopy polygons — lone trees and groups of trees — unioned with National Forest Inventory (NFI) woodland blocks (≥0.5 ha) that TOW deliberately excludes. Together they cover both street trees and actual woods. Polygon opacity scales with canopy area.',
|
'Forest Research Trees Outside Woodland (TOW) v1 canopy polygons — lone trees and groups of trees — unioned with National Forest Inventory (NFI) woodland blocks (≥0.5 ha) that TOW deliberately excludes. Together they cover both street trees and actual woods. Polygon opacity scales with canopy area.',
|
||||||
|
defaultEnabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'property-borders',
|
id: 'property-borders',
|
||||||
|
|
@ -45,6 +49,11 @@ export const OVERLAYS: OverlayDefinition[] = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/** Overlays shown on a fresh visit, before any `overlay` URL params apply. */
|
||||||
|
export const DEFAULT_OVERLAY_IDS: OverlayId[] = OVERLAYS.filter((o) => o.defaultEnabled).map(
|
||||||
|
(o) => o.id
|
||||||
|
);
|
||||||
|
|
||||||
const OVERLAY_ID_SET = new Set<string>(OVERLAY_IDS);
|
const OVERLAY_ID_SET = new Set<string>(OVERLAY_IDS);
|
||||||
|
|
||||||
export function isOverlayId(value: string): value is OverlayId {
|
export function isOverlayId(value: string): value is OverlayId {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue