diff --git a/index.html b/index.html
index e5fc7c7..7801a97 100644
--- a/index.html
+++ b/index.html
@@ -85,14 +85,23 @@
const features_nav = new Array();
const features_local = new Array();
+ const airport_name_to_ident = {
+ "Norberg": "SE-0004"
+ };
for(const line of lines) {
const [from, to] = line.split(',');
- const fromAirport = airportsData[from];
- const toAirport = airportsData[to];
+ let fromAirport = airportsData[from];
+ let toAirport = airportsData[to];
- if(!fromAirport) { alert(`Airport ${from} not found`); return; }
- if(!toAirport) { alert(`Airport ${to} not found`); return; }
+ if(!fromAirport) {
+ fromAirport = airportsData[airport_name_to_ident[from]];
+ if(!fromAirport) { alert(`Airport ${from} not found`); return; }
+ }
+ if(!toAirport) {
+ toAirport = airportsData[airport_name_to_ident[to]];
+ if(!toAirport) { alert(`Airport ${to} not found`); return; }
+ }
const fromLongitude = parseFloat(fromAirport.longitude);
const fromLatitude = parseFloat(fromAirport.latitude);