This commit is contained in:
Andras Schmelczer 2026-05-31 13:17:11 +01:00
parent c995f12f8b
commit 8dc939d761
44 changed files with 3540 additions and 2159478 deletions

View file

@ -32,14 +32,18 @@ export const ZOOM_TO_RESOLUTION_THRESHOLDS = [
{ maxZoom: 9, resolution: 6 },
{ maxZoom: 10.5, resolution: 7 },
{ maxZoom: 11.5, resolution: 8 },
{ maxZoom: 13, resolution: 9 },
] as const;
export const SMALLEST_VISIBLE_HEXAGON_RESOLUTION = Math.max(
...ZOOM_TO_RESOLUTION_THRESHOLDS.map(({ resolution }) => resolution)
);
export const POSTCODE_ZOOM_THRESHOLD = 15;
// Shared limit at which the zoomed-in detail layers — postcodes AND the map
// overlays (noise, crime, trees, property borders) — start showing. Set just
// past the finest hexagon level so detail appears while still relatively
// zoomed out. (Each overlay additionally can't render below its own tile-data
// floor, OVERLAY_MIN_ZOOM, regardless of this limit.)
export const POSTCODE_ZOOM_THRESHOLD = 12.5;
export const POSTCODE_SEARCH_ZOOM = 16;
export const FEATURE_GRADIENT: { t: number; color: [number, number, number] }[] = [
@ -233,8 +237,7 @@ export const STACKED_GROUPS: Record<
{
label: 'Serious crime',
feature: 'Serious crime (avg/yr)',
rateFeature: 'Serious crime per 1k residents (avg/yr)',
unit: 'per 1k/yr',
unit: 'avg/yr',
components: [
'Violence and sexual offences (avg/yr)',
'Robbery (avg/yr)',
@ -245,8 +248,7 @@ export const STACKED_GROUPS: Record<
{
label: 'Minor crime',
feature: 'Minor crime (avg/yr)',
rateFeature: 'Minor crime per 1k residents (avg/yr)',
unit: 'per 1k/yr',
unit: 'avg/yr',
components: [
'Anti-social behaviour (avg/yr)',
'Criminal damage and arson (avg/yr)',