Query Installed Regions

This section deals with reading locally installed regions, checking whether offline map data is available, and inspecting coverage bounds and cached region details.

1
let installedRegions = NGLRegionalOffline.listInstalledRegions()
2
3
for region in installedRegions {
4
print(
5
"region=\(region.regionId) " +
6
"version=\(region.regionVersion ?? "-") " +
7
"packages=\(region.packageCount) " +
8
"complete=\(region.allTarsOk)"
9
)
10
}

To check whether any region is available:

1
let hasInstalledRegions = NGLRegionalOffline.hasInstalledOfflineRegions()

To read the downloaded tile coverage bounds for installed regions:

1
let boundaries = NGLRegionalOffline.installedRegionBoundaries()

To load locally cached details for an installed region:

1
let result = NGLRegionalOffline.loadDetail(forRegionId: regionId)
2
let localDetail = result.detail