Skip to content

Commit

Permalink
Prioriting waypoints in GeoJson
Browse files Browse the repository at this point in the history
  • Loading branch information
fboes committed May 8, 2024
1 parent f803ff1 commit c811971
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions dist/Export/GeoJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class GeoJson {
"marker-color": c.type === MissionCheckpoint.TYPE_ORIGIN || c.type === MissionCheckpoint.TYPE_DESTINATION
? "#5e6eba"
: "#555555",
"symbol-sort-key": 0,
},
};
});
Expand All @@ -92,6 +93,7 @@ export class GeoJson {
direction: mission.origin_dir,
frequency: undefined,
"marker-symbol": "af-large_airport",
"symbol-sort-key": 1,
},
});
this.features.push({
Expand All @@ -108,6 +110,7 @@ export class GeoJson {
direction: mission.destination_dir,
frequency: undefined,
"marker-symbol": "af-large_airport",
"symbol-sort-key": 1,
},
});
this.drawLine(this.getLineCoordinates(mission));
Expand All @@ -129,6 +132,7 @@ export class GeoJson {
direction: undefined,
frequency: undefined,
"marker-symbol": "dot-10",
"symbol-sort-key": 2,
},
},
{
Expand All @@ -145,6 +149,7 @@ export class GeoJson {
direction: undefined,
frequency: undefined,
"marker-symbol": "dot-10",
"symbol-sort-key": 2,
stroke: "#FF1493",
},
},
Expand All @@ -165,6 +170,7 @@ export class GeoJson {
direction: undefined,
frequency: undefined,
"marker-symbol": "dot-10",
"symbol-sort-key": 2,
},
},
];
Expand Down
1 change: 1 addition & 0 deletions dist/Web/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ export class App {
"text-offset": [0, 0.5],
"text-anchor": "top",
"text-size": 12,
"symbol-sort-key": ["get", "symbol-sort-key"],
},
paint: {
"icon-color": "#FF1493",
Expand Down
8 changes: 7 additions & 1 deletion src/Export/GeoJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class GeoJson implements GeoJSON.FeatureCollection {
c.type === MissionCheckpoint.TYPE_ORIGIN || c.type === MissionCheckpoint.TYPE_DESTINATION
? "#5e6eba"
: "#555555",
"symbol-sort-key": 0,
},
};
});
Expand All @@ -120,6 +121,7 @@ export class GeoJson implements GeoJSON.FeatureCollection {
direction: mission.origin_dir,
frequency: undefined,
"marker-symbol": "af-large_airport",
"symbol-sort-key": 1,
},
});

Expand All @@ -137,6 +139,7 @@ export class GeoJson implements GeoJSON.FeatureCollection {
direction: mission.destination_dir,
frequency: undefined,
"marker-symbol": "af-large_airport",
"symbol-sort-key": 1,
},
});

Expand All @@ -160,7 +163,8 @@ export class GeoJson implements GeoJSON.FeatureCollection {
direction: undefined,
frequency: undefined,
"marker-symbol": "dot-10",
},
"symbol-sort-key": 2,
},
},
{
type: "Feature",
Expand All @@ -176,6 +180,7 @@ export class GeoJson implements GeoJSON.FeatureCollection {
direction: undefined,
frequency: undefined,
"marker-symbol": "dot-10",
"symbol-sort-key": 2,
stroke: "#FF1493",
},
},
Expand All @@ -196,6 +201,7 @@ export class GeoJson implements GeoJSON.FeatureCollection {
direction: undefined,
frequency: undefined,
"marker-symbol": "dot-10",
"symbol-sort-key": 2,
},
},
];
Expand Down
1 change: 1 addition & 0 deletions src/Web/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export class App {
"text-offset": [0, 0.5],
"text-anchor": "top",
"text-size": 12,
"symbol-sort-key": ["get", "symbol-sort-key"],
},
paint: {
"icon-color": "#FF1493",
Expand Down

0 comments on commit c811971

Please sign in to comment.