Skip to content

feat(gcx): background + dem fields in geocontext.json - #12

Merged
sirmmo merged 1 commit into
masterfrom
rewrite/angular-latest
May 6, 2026
Merged

feat(gcx): background + dem fields in geocontext.json#12
sirmmo merged 1 commit into
masterfrom
rewrite/angular-latest

Conversation

@sirmmo

@sirmmo sirmmo commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New top-level background field in geocontext.json — basemap shorthand accepting an alias ("osm", "ofm", "carto-voyager", …), a raw tile URL template, or a full {type, conf} layer descriptor (also accepts "none" to suppress any default).
  • New top-level dem field — Digital Elevation Model source. The MapLibre flavour renders it as a hillshade GL layer and (optionally) 3D terrain via setTerrain; the Leaflet flavour ignores it with a warning.
  • Generic raster-tiled and raster-dem layer types in mn-geo-layers, registered via a new provideMnGeoLayersBase(). These power the two new fields and are also usable directly inside layers[] for any tile service that doesn't warrant a dedicated provider library.
  • RasterDemDescriptor joins the renderer-agnostic descriptor union.
  • README documents both fields with worked examples (Mediterranean relief over CARTO Positron with terrarium DEM).

Test plan

  • ng build mn-geo-layers && ng build mn-geo-flavours-{leaflet,mapbox} && ng build gcx-core — all green.
  • ng build (app) — green; bundle stable (initial 2.21 MB / 513 kB transfer).
  • Smoke: load /map with the updated public/assets/gcx.json ("background": "osm") and confirm OSM tiles render.
  • Smoke: switch background to "https://…/{z}/{x}/{y}.png" and confirm the generic raster-tiled path renders.
  • Smoke: add "dem": { "url": "…", "terrain": true } and confirm hillshade + terrain on MapLibre, warning + no-op on Leaflet.

🤖 Generated with Claude Code

Adds shorthand basemap selection (`background`: alias / URL / object)
and an optional Digital Elevation Model source (`dem`) for hillshade
and 3D terrain on the MapLibre flavour. Generic `raster-tiled` and
`raster-dem` layer types land in mn-geo-layers as the underlying
mechanism, registered via `provideMnGeoLayersBase()`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sirmmo
sirmmo merged commit 2557f55 into master May 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant