More
Some checks failed
CI / Check (push) Failing after 2m14s
Build and publish Docker image / build-and-push (push) Failing after 2m38s

This commit is contained in:
Andras Schmelczer 2026-05-04 17:21:26 +01:00
parent cd34ee693f
commit 05a1f316e1
58 changed files with 3113 additions and 1277 deletions

View file

@ -6,6 +6,7 @@ import {
enumIndexToColor,
getBoundsFromViewState,
getFeatureFillColor,
getPoiIconUrl,
zoomToResolution,
} from './map-utils';
@ -36,6 +37,13 @@ describe('map utilities', () => {
expect(enumIndexToColor(ENUM_PALETTE.length)).toEqual(ENUM_PALETTE[0]);
});
it('prefers POI category logos before falling back to emoji icons', () => {
expect(getPoiIconUrl('Waitrose', '🛒')).toBe(
'https://geolytix.github.io/MapIcons/brands/waitrose_24px.svg'
);
expect(getPoiIconUrl('Unknown category', '🛒')).toBe('/assets/twemoji/1f6d2.png');
});
it('returns fallback, filtered, enum, feature, and density colors', () => {
expect(
getFeatureFillColor(