diff --git a/dist/Aerofly/MissionCheckpoint.js b/dist/Aerofly/MissionCheckpoint.js index b9f2f26..60e5039 100644 --- a/dist/Aerofly/MissionCheckpoint.js +++ b/dist/Aerofly/MissionCheckpoint.js @@ -85,8 +85,15 @@ export class MissionCheckpoint { if (this.frequency) { return this.frequency_unit === "M" ? MissionCheckpoint.TYPE_VOR : MissionCheckpoint.TYPE_NDB; } - if (this.name.match(/^[A-Z]{4,5}$/)) { - return this.name.length === 4 ? MissionCheckpoint.TYPE_AIRPORT : MissionCheckpoint.TYPE_FIX; + if (this.name.match(/^[A-Z]{3,5}$/)) { + switch (this.name.length) { + case 3: + return MissionCheckpoint.TYPE_VOR; + case 4: + return MissionCheckpoint.TYPE_AIRPORT; + default: + return MissionCheckpoint.TYPE_FIX; + } } } return this.type; diff --git a/dist/Export/GeoJson.js b/dist/Export/GeoJson.js index 1513bfb..6f2b83f 100644 --- a/dist/Export/GeoJson.js +++ b/dist/Export/GeoJson.js @@ -91,7 +91,7 @@ export class GeoJson { altitude: undefined, direction: mission.origin_dir, frequency: undefined, - "marker-symbol": "airport", + "marker-symbol": "af-large_airport", }, }); this.features.push({ @@ -107,7 +107,7 @@ export class GeoJson { altitude: undefined, direction: mission.destination_dir, frequency: undefined, - "marker-symbol": "airport", + "marker-symbol": "af-large_airport", }, }); this.drawLine(this.getLineCoordinates(mission)); @@ -255,15 +255,19 @@ export class GeoJson { } getGeoJsonIcon(cp) { switch (cp.type_extended) { + case MissionCheckpoint.TYPE_DESTINATION: + return "af-large_airport"; case MissionCheckpoint.TYPE_ORIGIN: case MissionCheckpoint.TYPE_DESTINATION: - return "airport"; + return "af-large_airport"; case MissionCheckpoint.TYPE_VOR: return "navaid-vor"; case MissionCheckpoint.TYPE_NDB: return "navaid-ndb"; case MissionCheckpoint.TYPE_FIX: return "navaid-fix"; + case MissionCheckpoint.TYPE_AIRPORT: + return "af-medium_airport"; default: return "navaid-waypoint"; } diff --git a/src/Aerofly/MissionCheckpoint.ts b/src/Aerofly/MissionCheckpoint.ts index 4263e74..6d791d1 100644 --- a/src/Aerofly/MissionCheckpoint.ts +++ b/src/Aerofly/MissionCheckpoint.ts @@ -115,8 +115,15 @@ export class MissionCheckpoint { if (this.frequency) { return this.frequency_unit === "M" ? MissionCheckpoint.TYPE_VOR : MissionCheckpoint.TYPE_NDB; } - if (this.name.match(/^[A-Z]{4,5}$/)) { - return this.name.length === 4 ? MissionCheckpoint.TYPE_AIRPORT : MissionCheckpoint.TYPE_FIX; + if (this.name.match(/^[A-Z]{3,5}$/)) { + switch (this.name.length) { + case 3: + return MissionCheckpoint.TYPE_VOR; + case 4: + return MissionCheckpoint.TYPE_AIRPORT; + default: + return MissionCheckpoint.TYPE_FIX; + } } } diff --git a/src/Export/GeoJson.ts b/src/Export/GeoJson.ts index 0c0e233..45f60b5 100644 --- a/src/Export/GeoJson.ts +++ b/src/Export/GeoJson.ts @@ -119,7 +119,7 @@ export class GeoJson implements GeoJSON.FeatureCollection { altitude: undefined, direction: mission.origin_dir, frequency: undefined, - "marker-symbol": "airport", + "marker-symbol": "af-large_airport", }, }); @@ -136,7 +136,7 @@ export class GeoJson implements GeoJSON.FeatureCollection { altitude: undefined, direction: mission.destination_dir, frequency: undefined, - "marker-symbol": "airport", + "marker-symbol": "af-large_airport", }, }); @@ -304,15 +304,19 @@ export class GeoJson implements GeoJSON.FeatureCollection { protected getGeoJsonIcon(cp: MissionCheckpoint): string { switch (cp.type_extended) { + case MissionCheckpoint.TYPE_DESTINATION: + return "af-large_airport"; case MissionCheckpoint.TYPE_ORIGIN: case MissionCheckpoint.TYPE_DESTINATION: - return "airport"; + return "af-large_airport"; case MissionCheckpoint.TYPE_VOR: return "navaid-vor"; case MissionCheckpoint.TYPE_NDB: return "navaid-ndb"; case MissionCheckpoint.TYPE_FIX: return "navaid-fix"; + case MissionCheckpoint.TYPE_AIRPORT: + return "af-medium_airport"; default: return "navaid-waypoint"; }