Offosm : OSM that you can access while you’re offline
Posted by rphyrin on 2 February 2026 in English. Last updated on 6 February 2026.Starting in 2026, I slightly adjusted my daily routine, particularly around my weeklyOSM-related activity. Instead of passively consuming updates, I began actively scanning for news by lurking in several regional OSM online groups. Occasionally, genuinely newsworthy discussions emerge there.
One such case appeared today in the OpenStreetMap Braga (Portugal) Telegram group.
In the aftermath of Storm Kristin, which recently hit Portugal, multiple OSM-driven humanitarian initiatives surfaced. These efforts focused on mapping damage, identifying locations that require assistance, and highlighting places offering help.
At some point, the discussion shifted toward the need for a truly offline mapping application. Connectivity issues in affected areas appeared to render many OSM-based emergency platforms ineffective, simply because they still depend on an active internet connection.
This resonated with my own experience. I have built several “half-offline” OSM-based applications before. They are only partially offline because they store coordinate data locally in the user’s browser, while the application code itself and the OSM map tiles still require network access.
That led to a straightforward question: if we want a truly offline application, shouldn’t the map tiles themselves also be stored locally in the browser? Storing coordinate data is already trivial, but what about images? BLOBs? Is this feasible at scale?
While I was still thinking through these constraints, someone in the same Telegram group announced that an offline emergency platform had already been built. Naturally, I was curious and tested it by toggling my network connection on and off.
The result was clear: the application remained accessible offline.

I then dug deeper using Chrome DevTools to understand how the platform handled map storage. The answer was surprisingly simple. Yes, it is entirely possible to store OSM map tiles directly in the browser and reuse them later when offline.

At that point, I decided to reverse engineer how sosleiria’s CacheStorage works and make a proof-of-concept app, focusing on only two basic features: basic map rendering and GPS-based positioning.
The result is this application : https://github.com/altilunium/offosm
As for practical use cases, one scenario stands out. Suppose you plan to visit a city tomorrow. Today, you open the app and explore that city using it at least once. As you pan and zoom, more OSM tiles are downloaded and cached locally in your browser. The more you explore the map, the more data becomes available offline.
When tomorrow arrives, you can open the app again. Since it is a PWA, it remains accessible even without connectivity. You enable GPS, which operates independently of internet access, and navigate the city using the cached map tiles. At that point, the application effectively behaves like an offline map, relying solely on GPS signals.
Another unexpected use case is archiving OSM map tiles.
In this app, you can keep older map tiles while downloading newer versions. You can compare them side by side and choose the one you consider better.

Map tile 11-1636-1063 in two versions: one from two seconds ago and another from 54 minutes ago. You can choose one and delete the other, or request a completely new version by clicking Update.
Here, tile selection is explicit: older or newer. You can use your own judgment to decide which map tile is better
Update :
I developed this app last night, testing it several times, thinking possible new feature before i went to sleep, sleep, wake up, then goes straight to implement those new features. v26.2.3 is now released.
Discussion
Comment from TomH on 3 February 2026 at 08:33
You should probably be aware that the usage policy for tile.openstreetmap.org prohibits (for very good reasons) bulk downloading of tiles for offline use.
Comment from rphyrin on 6 February 2026 at 09:25
@TomH
Yes.
This app behaves like a standard Leaflet slippy map, but with a custom-made caching strategy (that can last more than seven days), and PWA support (so users can still access cached tiles while offline). It is designed specifically to minimize interaction with OpenStreetMap tile servers as much as possible.
There is no prefetching (speculative fetching of data before it is actually needed), and no bulk downloading mechanism (aggressively requests large numbers of tiles in the background). It behaves like a normal, standard Leaflet slippy map.
I personally ensure that it respects the “permitted usage example” in the tile usage policy: (1) normal interactive viewing by a human, where the client requests only the tiles needed for the current viewport + (2) re-visits served from the local cache.
Comment from Peter Boswell on 9 February 2026 at 14:28
Great work. Would vector tiles be possible, eventually?