Skip to content

Commit

Permalink
Improve lookup to include category
Browse files Browse the repository at this point in the history
  • Loading branch information
cr0wst committed Feb 3, 2025
1 parent b4296bb commit 8e873ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/Map.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
id: string;
short: string;
color?: string;
category: string;
geojson: any; // GeoJSON type
};
Expand Down Expand Up @@ -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, {
Expand Down

0 comments on commit 8e873ed

Please sign in to comment.