landscape-map.jsThis file controls the interactive landscape map on the website.
It does four main jobs:
assets/data/landscape-map.json.When the script loads, it runs inside an IIFE:
(function () {
...
})();
This keeps all variables local to this file.
The startup order is:
initialiseMap()registerFilterDismiss()loadDataset()stateThis stores the current map state:
If the map behaves strangely, this is often the first place to inspect.
FILTER_CONFIGSThis is the shared setup for the filter dropdowns.
Each filter defines:
This lets the code reuse one filter renderer instead of repeating similar functions.
loadDataset()This fetches the JSON file:
data-map-data-url from the HTMLstate.datasetrenderDashboard()This is the main high-level render function.
It:
getConnections()This is the main filtering function.
It returns the connections that should currently appear on the map.
Right now it filters by:
If you want to add a new filter, this is one of the main places to update.
renderMap()This draws the visible map overlay.
It:
renderInfoBox()This builds the popup card shown when an arc is clicked.
It uses getPopupActivities() to show all activities for the selected project at the selected destination city.
Edit initialiseMap():
}).setView([54.5, -3], 5);
Edit FILTER_CONFIGS.
Edit getConnections().
Edit buildCurvePath(fromPoint, toPoint).
Edit renderInfoBox() and getPopupActivities().
Edit the image marker blocks inside renderMap().