# Preview Offline Map

The preview screen must register the active map style and may be configured to read tiles only from the cache. Focus the region bounds before enabling cache-only mode so local map data can be verified clearly.

Map preview:

```swift
NBNavigation.registerOfflineMapStyle(
    mapView: mapView,
    styleURL: mapView.styleURL
)

_ = try NBNavigation.focusOfflineMapRegion(
    mapView: mapView,
    regionId: String(regionId)
)
NBNavigation.enableCacheOnlyPreview(mapView: mapView)

// Restore network tile fetching when leaving cache-only preview.
NBNavigation.disableCacheOnlyPreview(mapView: mapView)
```

If the routing catalog is available but the map catalog or installed map packages fail to load, the screen may still display a region row while the preview has missing tiles. Check the component error fields from _fetchRegionLists_ and _mapInstalledRegionList_ instead of treating a blank map as evidence that routing data was lost.
