ADR 0005: ISS widget: Where the ISS at? API and MapLibre with OpenFreeMap
Ce contenu n’est pas encore disponible dans votre langue.
- Status: accepted
- Date: 2026-11-21
- Answers: questions Q4 and Q5 of the project charter
Context and Problem Statement
Section titled “Context and Problem Statement”The ISS widget (issue #15) shows the current position of the International Space Station on a map, refreshed every few seconds, with latitude, longitude and speed as text. Where do we get the position, and how do we draw the map?
Decision Drivers
Section titled “Decision Drivers”- Free, no API key to protect
- Reliable enough for a public portfolio (risk R2: external APIs)
- Respect the usage limits and terms of the data and map providers
- Good rendering and smooth interaction
- Accessible: the information is also available as text
- Small impact on page performance (Lighthouse)
Considered Options
Section titled “Considered Options”Position of the ISS:
- Where the ISS at? REST API, called by the
bff - Position computed from orbit data (TLE) with an orbital mechanics library
Map:
- Leaflet with OpenStreetMap raster tiles
- MapLibre GL JS with OpenFreeMap vector tiles
- Our own SVG world map (equirectangular projection)
Decision Outcome
Section titled “Decision Outcome”Position: Where the ISS at? API, through the bff
Section titled “Position: Where the ISS at? API, through the bff”Chosen option: “Where the ISS at? API”, because it is free, uses HTTPS, needs no key, and gives latitude, longitude, altitude and speed. It also offers orbit data and upcoming passes over a place, useful for issue #28.
- The
bffcallshttps://api.wheretheiss.at/v1/satellites/25544(25544 is the NORAD id of the ISS) and exposesGET /api/iss/position. - The response is cached for 5 seconds. Whatever the number of visitors,
the
bffcalls the API at most once every 5 seconds, far below its limit of about one request per second. - Fallback plan if the API disappears: compute the position from TLE data.
Map: MapLibre GL JS with OpenFreeMap
Section titled “Map: MapLibre GL JS with OpenFreeMap”Chosen option: “MapLibre GL JS with OpenFreeMap”, because it gives a smooth, zoomable vector map, and OpenFreeMap is free with no limits, no key and no cookies.
- Map style:
https://tiles.openfreemap.org/styles/liberty. The style URL is a configuration value, so we can switch to another provider or a self-hosted instance without code changes. - The map tiles are loaded by the browser directly from OpenFreeMap
(not through the
bff). - MapLibre is loaded only when an ISS widget is on the dashboard
(Angular
@defer/ lazy loading), so it does not slow down the first page load. - The OpenStreetMap attribution included in the style stays visible.
- The map container has an accessible name, and latitude, longitude, speed and last update time are always shown as text under the map.
Consequences
Section titled “Consequences”- Good: no API key, no cost, no account for both services.
- Good: smooth and zoomable map, which looks professional.
- Good: the position cache protects the external API and our users.
- Bad: MapLibre is a large library. Mitigation: loaded only when needed.
- Bad: the map is drawn in a
canvas, which screen readers cannot read. Mitigation: all information is also given as text. - Bad: both services are free public services with no guarantee. Mitigation: error state in the widget (issue #12), configurable map style, documented fallback for the position.
Pros and Cons of the Options
Section titled “Pros and Cons of the Options”Where the ISS at? API (chosen)
Section titled “Where the ISS at? API (chosen)”- Good: free, HTTPS, no authentication, rich data (position, speed, passes).
- Bad: about one request per second; third-party service without guarantee.
Position computed from TLE data
Section titled “Position computed from TLE data”- Good: no dependency on a real-time service.
- Bad: needs an orbital mechanics library and much more work for one widget.
Leaflet with OpenStreetMap tiles
Section titled “Leaflet with OpenStreetMap tiles”- Good: simple, light, well known.
- Bad: OpenStreetMap tile servers have limited capacity, can block access without notice and give no guarantee; attribution and usage rules to follow.
MapLibre GL JS with OpenFreeMap (chosen)
Section titled “MapLibre GL JS with OpenFreeMap (chosen)”- Good: free, no limits, no key, no cookies; modern vector rendering.
- Bad: large library; canvas not readable by screen readers.
Our own SVG world map
Section titled “Our own SVG world map”- Good: no external dependency at run time, very light, accessible, follows the themes.
- Bad: no zoom and no detail; less rich visually.