From 59fb222cf2628da8c0464a1d35e2c49d23a4b0d0 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Sun, 17 Nov 2024 14:42:17 +0100 Subject: [PATCH] Fix key casing --- src/app/modules/map/ol/lib/s57.service.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/modules/map/ol/lib/s57.service.ts b/src/app/modules/map/ol/lib/s57.service.ts index 3662eb79..50b1b24a 100644 --- a/src/app/modules/map/ol/lib/s57.service.ts +++ b/src/app/modules/map/ol/lib/s57.service.ts @@ -344,9 +344,15 @@ export class S57Service { } public selectLookup(feature: Feature): number { - const properties = feature.getProperties(); + const props = feature.getProperties(); + const properties={}; + Object.keys(props).forEach((k) => { + properties[k.toUpperCase()]=props[k] + }) + + const geometry = feature.getGeometry(); - const name = properties['layer']; + const name = properties['LAYER']; const geomType = geometry.getType(); let lookupTable = LookupTable.PAPER_CHART;