Fetch Regional Catalog
Retrieve the Online Catalog
The online regional catalog is the list of all the regions that the service can download. fetchRegionList() requires a network connection and can retrieve the online catalog:
OfflineCatalogItem's commonly used fields:
| Field | Purpose |
|---|---|
regionId | Stable ID for subsequent queries, downloads, and task control |
name, adminL0, adminL1, adminL3 | Build the region-list hierarchy |
version | Compare with the local regionVersion to detect updates |
totalSize | Estimated compressed download size in bytes |
tileCount | Estimated server-side tile count |
totalSize and tileCount are server estimates. Actual disk usage may differ because of file formats, SQLite overhead, and file-system overhead.
Retrieve a Region’s details
Fetch region details before download to inspect the package list, size, and zoom range for the selected region.
Each OfflinePackageInfo provides tarName, tarSize, minZoom and maxZoom. A region consists of one or more pre-generated packages.
Query Online and Local State Together
Use queryRegions() when the download page needs a combined snapshot of the online catalog and the regions already installed on the device. The download page can use the following on initial load:
When the device is offline, queryRegions() still returns installed regions, while the catalog is empty. Keep the local list and mark regions from the online catalog as temporarily unavailable.