ReviewOS

stacks/ts-maps

Offline: include terrain (DEM) tiles in downloads

#6254
Closed chris opened this 9 days ago ·
9 days ago

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 planArea when terrain is on (and hillshade raster-dem sources 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.

Sign in to comment on this issue.