Skip to content

ADR 0005: ISS widget: Where the ISS at? API and MapLibre with OpenFreeMap

  • Status: accepted
  • Date: 2026-11-21
  • Answers: questions Q4 and Q5 of the project charter

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?

  • 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)

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)

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 bff calls https://api.wheretheiss.at/v1/satellites/25544 (25544 is the NORAD id of the ISS) and exposes GET /api/iss/position.
  • The response is cached for 5 seconds. Whatever the number of visitors, the bff calls 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.

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.
  • 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.
  • Good: free, HTTPS, no authentication, rich data (position, speed, passes).
  • Bad: about one request per second; third-party service without guarantee.
  • Good: no dependency on a real-time service.
  • Bad: needs an orbital mechanics library and much more work for one widget.
  • 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.
  • Good: free, no limits, no key, no cookies; modern vector rendering.
  • Bad: large library; canvas not readable by screen readers.
  • Good: no external dependency at run time, very light, accessible, follows the themes.
  • Bad: no zoom and no detail; less rich visually.