Skip to content

FlightSeatmap/flightmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flightmap

Generate beautiful flight path maps from IATA airport codes. A free CLI tool powered by OpenFreeMap and MapLibre GL JS.

Round-the-world example

npx @flightseatmap/flightmap JFK-LHR LHR-DXB DXB-SYD --style dark --output trip.png

Install

npm install -g @flightseatmap/flightmap

Or run without installing:

npx @flightseatmap/flightmap LAX-HND

First run downloads a headless Chromium (~150 MB) via Playwright.

Usage

flightmap <route>... [options]

A route is a pair of IATA airport codes joined with a hyphen (e.g. JFK-LHR). Pass as many as you want — they all render on the same map.

Examples

Single route:

flightmap JFK-LHR

Multi-leg trip:

flightmap JFK-CDG CDG-FCO FCO-JFK

Round-the-world:

flightmap LAX-NRT NRT-SIN SIN-DXB DXB-LHR LHR-LAX --style dark --width 2000

Save as interactive HTML instead of PNG:

flightmap SFO-SYD --html --output trip.html

Options

Flag Default Description
-o, --output <file> flightmap.png Output file path
-s, --style <style> positron Map style: liberty, positron, bright, dark, fiord
-w, --width <px> 1600 Image width
-H, --height <px> 900 Image height
--html off Output a standalone interactive HTML file
--no-watermark watermark on Hide the flightseatmap.com watermark
-V, --version Print version
--help Show help

Styles

  • liberty — colorful OpenStreetMap-style
  • positron — minimal light grey (great default for prints)
  • bright — vivid OSM colors
  • dark — dark mode
  • fiord — muted blue/green

How it works

  1. Parses your IATA pairs and looks up coordinates from a bundled OpenFlights airport database.
  2. Computes a great-circle arc for each route using @turf/great-circle.
  3. Spawns a headless Chromium, loads MapLibre GL JS with OpenFreeMap vector tiles, draws the arcs and airport markers, and screenshots the result.

Credits

License

MIT

About

Generate beautiful flight path maps from IATA airport codes. Free CLI powered by OpenFreeMap.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors