All-natural web development, poignant wit, and hippie ramblings since 2004.
Getting MapLibre working for both native and web in Expo
I've been dabbling of late in building a mobile app with React Native + Expo. One of the things that attracted me most to Expo, is that – on top of the "write once, run on iOS and Android" claim of React Native – Expo claims to also let an app run seamlessly on the web. Anyway, as it turns out (surprise surprise – not!), neither of those claims are particularly aligned with reality. I found this out – with the claim of "run on native and web" – as soon as I wanted to add a simple map to my app.
Below is my humble lil' guide to getting MapLibre working for both native and web in Expo. Note: if you want to skip the step-by-step shpiel, and you just want a working example with all the code, feel free to head straight to the Expo MapLibre native + web demo on GitHub.
- Sea level rise is gonna get a whole lot realer (1 Jan 2025)
- Introducing: World Locality Transit Graph (23 Jun 2024)
- Introducing: Floyd-Warshall CSV Generator (9 Jun 2024)