From 8e873edc7b3465fd479702635a69ca74c1c492f6 Mon Sep 17 00:00:00 2001 From: Steve Crow Date: Mon, 3 Feb 2025 18:31:13 -0500 Subject: [PATCH] Improve lookup to include category --- src/routes/Map.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/Map.svelte b/src/routes/Map.svelte index 2c5ce6a..0225849 100644 --- a/src/routes/Map.svelte +++ b/src/routes/Map.svelte @@ -347,6 +347,7 @@ id: string; short: string; color?: string; + category: string; geojson: any; // GeoJSON type }; @@ -374,7 +375,7 @@ // Draw areas for each TRACON prefix traconPrefixes.forEach((prefix) => { // Find area where the short name starts with the prefix - const area = areas.find((a) => a.id == `${prefix}z`); + const area = areas.find((a) => a.short.startsWith(prefix) && a.category === 'Terminal'); if (!area || drawnAreas.has(area.short)) return; const geoJsonLayer = L!.geoJSON(area.geojson, {