More fixes
This commit is contained in:
parent
791bc6976b
commit
14a3555cf1
21 changed files with 549 additions and 99 deletions
|
|
@ -28,8 +28,8 @@ export const INITIAL_VIEW_STATE: ViewState = {
|
|||
* Returns the H3 resolution to use for a given zoom level.
|
||||
*/
|
||||
export const ZOOM_TO_RESOLUTION_THRESHOLDS = [
|
||||
{ maxZoom: 7.5, resolution: 5 },
|
||||
{ maxZoom: 9.5, resolution: 6 },
|
||||
{ maxZoom: 7, resolution: 5 },
|
||||
{ maxZoom: 9, resolution: 6 },
|
||||
{ maxZoom: 10.5, resolution: 7 },
|
||||
{ maxZoom: 11.5, resolution: 8 },
|
||||
{ maxZoom: 13, resolution: 9 },
|
||||
|
|
@ -68,6 +68,41 @@ export const GLYPHS_URL = '/assets/fonts/{fontstack}/{range}.pbf';
|
|||
/** Twemoji base URL (served locally from public/assets/) */
|
||||
export const TWEMOJI_BASE = '/assets/twemoji/';
|
||||
|
||||
/** POI group → RGB color for category-coded map markers */
|
||||
export const POI_GROUP_COLORS: Record<string, [number, number, number]> = {
|
||||
'Public Transport': [59, 130, 246],
|
||||
Leisure: [249, 115, 22],
|
||||
Education: [139, 92, 246],
|
||||
Health: [239, 68, 68],
|
||||
'Emergency Services': [220, 38, 38],
|
||||
Other: [107, 114, 128],
|
||||
Groceries: [34, 197, 94],
|
||||
'Local Businesses': [245, 158, 11],
|
||||
Culture: [236, 72, 153],
|
||||
Services: [6, 182, 212],
|
||||
Shops: [99, 102, 241],
|
||||
};
|
||||
|
||||
/** Default color for unknown POI groups */
|
||||
export const POI_DEFAULT_COLOR: [number, number, number] = [107, 114, 128];
|
||||
|
||||
/** Categories only shown when zoomed in past MINOR_POI_ZOOM_THRESHOLD */
|
||||
export const MINOR_POI_CATEGORIES = new Set([
|
||||
'Bus stop',
|
||||
'Taxi rank',
|
||||
'EV Charging',
|
||||
'Playground',
|
||||
]);
|
||||
|
||||
/** Zoom level below which minor POI categories are hidden */
|
||||
export const MINOR_POI_ZOOM_THRESHOLD = 14;
|
||||
|
||||
/** Supercluster grouping radius in pixels */
|
||||
export const POI_CLUSTER_RADIUS = 50;
|
||||
|
||||
/** Zoom level at which supercluster stops clustering */
|
||||
export const POI_CLUSTER_MAX_ZOOM = 15;
|
||||
|
||||
/**
|
||||
* Groups whose features should be collapsed into stacked bar charts.
|
||||
* Keyed by feature group name. Each entry defines one stacked chart.
|
||||
|
|
@ -153,8 +188,8 @@ export const STACKED_ENUM_GROUPS: Record<
|
|||
},
|
||||
{
|
||||
label: 'Leasehold/Freehold',
|
||||
feature: 'Leasehold/Freehold',
|
||||
components: ['Leasehold/Freehold'],
|
||||
feature: 'Leashold/Freehold',
|
||||
components: ['Leashold/Freehold'],
|
||||
valueOrder: ['Freehold', 'Leasehold'],
|
||||
valueColors: ['#3b82f6', '#f59e0b'],
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue