Flight Historian Version 2.5: Interactive Mapbox Maps

A screenshot of flighthistorian.com, showing a zoomed in map on the page for the ATL airport.

A Mapbox map of my routes from Atlanta, showing the ability to zoom in.

Since its creation, Flight Historian (and formerly Flight Log) have used Great Circle Mapper static images for its flight maps. I’ve now replaced these static maps with interactive (scrollable, zoomable) maps provided by Mapbox.

Map Replacement Considerations

While I really like Great Circle Mapper, it wasn’t an ideal fit for a site like my flight log where I needed to programmatically generate maps from database entries. Most importantly, it didn’t have an API available. I originally created code to generate Great Circle Mapper image URLs so I could directly embed them on my (non-commercial) flight log with appropriate credit and a map link, as described in their FAQ.

As time went on, I switched to HTTPS while Great Circle Mapper never did, which caused browsers to complain about embedding non-secure content in a secure page. I ended up having to have my site cache the Great Circle Mapper map image on an AWS S3 instance the first time each particular map was needed, so that I would be able to serve it as HTTPS. (I still maintained links to the original map on the Great Circle Mapper site, as well as the requested credit.) This worked, but it wasn’t an ideal solution.

Knowing I’d want to eventually replace this solution (and knowing that I wanted to be able to download map data for use in QGIS), I wrote some methods to generate GPX and KML maps in version 2.3, made them available for download via links for each map in version 2.4, and made GeoJSON data available in the same manner since that release.

Mapbox GL JS is able to use GeoJSON data hosted on the web as a data source, and I now had a GeoJSON link with automatically-updated data for each of my Flight Historian maps. (I initially tested it with the map at the top of this site’s One Hundred Airports page, which pulls its data directly from Flight Historian GeoJSON.) With that in place, it was relatively easy to embed Mapbox maps in place of all of Flight Historian’s Great Circle Mapper maps, with each map sourcing its data from its own GeoJSON link.

Changelog

New

Changed

Removed

Tags: