ReviewOS

stacks/ts-maps

React Native: store offline maps natively instead of in WebView IndexedDB

#6260
Closed chris opened this 9 days ago ·
9 days ago

On React Native, the map runs inside a WebView, so offline maps are stored in the WebView's IndexedDB. OSes can evict WebView storage under pressure, and the app can't see or manage that storage natively.

Scope

  • An OfflineStore backed by native storage (files via the host app), bridged over the existing envelope protocol. The store interface in offline/OfflineStore.ts is small: get/put/delete for tiles, refs, regions, plans and indexes.
  • Or a documented way to pass a store in through MapView.
  • Keep offlineMaps / onOfflineMaps behaviour the same.

Sign in to comment on this issue.