MapboxGL Now Supports Non-Mercator Projections
Mapbox GL’s latest release introduces support for additional map projections that developers can use to create web maps:
The additions break with a long-lasting custom in interactive web mapping. Web maps are typically rendered using the Mercator projection, primarily for practical reasons: A square map is easier to divide into tiles. And Mercator preserves angles which is essential for navigation, the primary use case for early web maps.
Every web projection has trade-offs. Mercator inflates areas towards the poles:
[…] Mercator heavily distorts sizes on a global scale, inflating shapes the farther away they are from the equator. This is why most people living in the Internet era think that Greenland is as big as Africa, even though it’s actually 14 (!) times smaller.
But non-conformal projections, in large scales, distort shapes towards the edges of the map. Mapbox’ implementation solves this problem by seamlessly transitioning from the selected projection to Mercator in higher zoom levels, minimising distortions at every zoom level.1 You get the best of both worlds.
The new map projections open up new possibilities for interactive thematic mapping, especially for maps of continents or the whole world.
I created an Observable notebook to demonstrate different projections, their configuration, and how a map transitions between projections while zooming. ↩