Building Frontend Maps

TLDR: Maps are easy to get started with if you follow some “common” assumptions. When getting to pin point accuracy, or translating between different models of the earth, maps become difficult very quickly.

Intro

Recently I have been looking a designing frontends for Geospatial applications. There are many good blogs out there (marks blog) for the actual data analysis and geospatial analysis aspect. But I have only found a few good examples of building interactive maps for the web.

assumptions

Open Street Map uses WGS84 (EPSG.) the spherical mercador projection. Why does this matter?

Loose notes:

How they work

Both right now are using Open Street Maps tiling service. A tiling service breaks up the world into varying images at different zoom levels. These are all represented via 4 parameters, s,x,y,z

Example using MapLibre

MapLibre GL JS seems to be the best library so far. Additionally they can render things like 3d buildings and elevation for a high-fidelity experience.

MapLibre GL seems like the best out of the box library for displaying geospatial info. I think I would start most frontends with this library and either swap to Leaflet if there is an issue, or build something custom (if MapLibre doesn’t support it then WASM and WebGPU seem like the best fall backs).

MapLibre

Resources