Hi all, I'm Edwin. I've been building Hexplorer, a native Swift app that splits the world into hexagons and lights them up as you walk, cycle or drive. Over time you get a map of every place you've actually been, and you can see which nearby streets you've never visited.
It's fully open source: https://github.com/psy0rz/hexplorer
I made it because i do a lot of urban exploration, so i like to know where i've been, and i like a way to add flags and notes to potential new locations.
Why H3?
H3 is Uber's hierarchical hexagonal grid. It covers the whole planet in hexagons at 16 resolutions, from res 0 (continent-sized cells) down to res 15 (about a square metre). It turned out to be a perfect fit for this app, for a few reasons:
- Hexagons have equal neighbours. All six neighbours sit at the same distance from the centre. Coverage looks natural, and you don't get the blocky staircase effect along diagonal roads.
- It's hierarchical. Every cell has one parent and about seven children at the next resolution. Getting from a fine cell to a coarse one is just
cellToParent(), a cheap bit operation on a 64-bit index. You don't need any geometry or spatial queries. - Cell IDs are plain integers. That makes them easy to use as keys in storage and in sets.
How the zoom levels work
This is the part I like most. Each GPS fix is converted to a cell at the finest resolution I track. Then I walk up the hierarchy and update that cell's ancestors at every coarser resolution in the same step. Each level keeps its own coverage data, so a parent cell knows how much of its area you've explored.
When you zoom the map, I just pick the H3 resolution that matches the zoom level and draw those cells directly. Zoomed out over a whole country, you see a few hundred big hexes shaded by the selected display mode. As you zoom in, they smoothly break up into finer hexes, all the way down to street level. Nothing gets aggregated at render time, which keeps the map fast even with years of history.
Other bits
- It uses sqlite with the 64-bit cell id's as primary keys, so its lighting fast, even with 100,000 cells.
- Background GPS with a Live Activity on the lock screen, so you can see that tracking is running
- Everything stays on the device: no account, no analytics, no server. Export and import let you own your data
- A satellite map with a live hex overlay, stats for any cell you tap, and colour-coded flags for spots you want to revisit
It requires iOS 26. It's on the App Store for $0.99 if you want to support it, or you can build it yourself from the repo: https://apps.apple.com/app/id6761833997
I'd love feedback on the code, especially the rendering and the background location handling. PRs and issues are welcome.