Caching Strategy
To ensure seamless user experience through connection drops, the system maintains a local cache supporting both navigation and map visualization. The cache is built and refreshed whenever the system is online, using several prefetching and update strategies.
Tile caching
Data is downloaded from the server and stored in the cache so that it can be reused during navigation, between multiple app lifecycles. The data served by the server is packed in tiles, which are compact segments of the map that represent a specific geographical area. The system prefetches tiles relevant to the user’s current context:
- Without active route: Prefetches tiles relevant to the current location or around the most probable path (which is the path the user is likely to take based on their current trajectory).
- With active route: Prefetches tiles along the active route. This ensures smooth navigation experience to the user even with unreliable network connections.
- On demand: Fetches additional tiles reactively when a component detects missing map data. This supplements baseline prefetching to maintain accurate guidance and visuals without excessively increasing data usage.
Tile updates
Cached tiles may remain on the device for an extended period. To maintain quality and consistency, the system applies updates when needed.
Cache freshness & Update
Tiles are updated individually when they are relevant to the ongoing navigation and a new version of the tile exists on the server. The updates run automatically in the background without blocking any navigation experience. New tiles are freshly downloaded over the air when needed.
Tile eviction
The cache storage allocated to map tiles is bounded and managed by the SDK. The system automatically evicts tiles that are no longer relevant or least likely to be needed soon.
Behavior during connectivity loss
If connectivity drops — briefly in a tunnel, or for a longer stretch — the system seamlessly switches to using cached content. Navigation, map rendering, and horizon continue to function using the local cache or until connectivity is restored.
If the user deviates from the planned route, the system will continue to provide guidance back to the original route, provided the necessary tiles are cached. Starting a new search or calculating a new route is not possible while offline. Guidance for the existing route remains available using cached data.
If the system reaches an area with no cached tiles and connectivity is still unavailable, navigation and online-dependent services (e.g., search, routing, traffic, hazards) will become unavailable until the connection is restored.