feat(gcx): background + dem fields in geocontext.json - #12
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backgroundfield ingeocontext.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).demfield — Digital Elevation Model source. The MapLibre flavour renders it as a hillshade GL layer and (optionally) 3D terrain viasetTerrain; the Leaflet flavour ignores it with a warning.raster-tiledandraster-demlayer types inmn-geo-layers, registered via a newprovideMnGeoLayersBase(). These power the two new fields and are also usable directly insidelayers[]for any tile service that doesn't warrant a dedicated provider library.RasterDemDescriptorjoins the renderer-agnostic descriptor union.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)./mapwith the updatedpublic/assets/gcx.json("background": "osm") and confirm OSM tiles render.backgroundto"https://…/{z}/{x}/{y}.png"and confirm the genericraster-tiledpath renders."dem": { "url": "…", "terrain": true }and confirm hillshade + terrain on MapLibre, warning + no-op on Leaflet.🤖 Generated with Claude Code