Add a hillshade/terrain-shading toggle to the map
Sidebar toggle (new HillshadeControl) adds a raster-dem hillshade layer: public Terrarium tiles when online, or a local data/terrain.pmtiles when present (mirrors offline.pmtiles' optional- local-file pattern, new /api/terrain-tiles + /tiles/terrain.pmtiles endpoints). No offline terrain data is bundled, so the toggle is online-only until one is generated — see docs/development.adoc for how.
This commit is contained in:
1 parent
f49e44800a
commit
77a4c96b1c
5 files changed
+115
-4
No files matched your search
@@ -43,6 +43,22 @@ build one locally:
|
||||
Once the file is in place, `GET /api/offline-tiles` reports
|
||||
`available: true` and the map defaults to the offline style.
|
||||
|
||||
== Offline terrain data (hillshade)
|
||||
|
||||
The sidebar's "Terrain shading" toggle works online out of the box
|
||||
(public https://github.com/tilezen/joerd[Terrarium] elevation tiles,
|
||||
no API key). For it to work offline too, place a PMTiles archive of
|
||||
Terrarium-encoded `raster-dem` tiles at `data/terrain.pmtiles`
|
||||
(`GET /api/terrain-tiles` reports `available: true` once it's there,
|
||||
same pattern as offline map data above). It is not part of the
|
||||
repository — build one locally from a DEM source (e.g. Copernicus
|
||||
GLO-30 or SRTM) with a tool like
|
||||
https://github.com/mapbox/rio-rgbify[rio-rgbify] (GeoTIFF ->
|
||||
Terrarium-encoded PNG tiles in an `.mbtiles`), then
|
||||
`pmtiles convert out.mbtiles data/terrain.pmtiles` with
|
||||
https://github.com/protomaps/go-pmtiles[go-pmtiles], same as
|
||||
`data/offline.pmtiles`.
|
||||
|
||||
== GNSS position (gpsd)
|
||||
|
||||
The "GNSS" control needs https://gpsd.io[gpsd] running and pointed at
|
||||
|
||||
Reference in new issue
Block a user