Offline downloads enumerate the map's tile layers (offline/plan.ts, planArea). Terrain set with map.setTerrain({ source }) loads DEM tiles through TerrainSource / fetchDemTile, not through a tile layer. Those DEM tiles are not included in map.offline.download().
fetchDemTile already reads downloaded tiles first via offlineFetch, so DEM tiles stored in a region would be used. The only gap is planning them.
Scope
- Include the terrain source's tile template in
planAreawhen terrain is on (and hillshaderaster-demsources without a layer). - DEM zooms: the source's max zoom, capped sensibly (DEM tiles are large).
- Include DEM tiles in size estimates.
- Test: a map with terrain downloads DEM tiles, and draws terrain with the network blocked.