Add contour lines to the Overlays panel via maplibre-contour
5th Overlays item, generated client-side from the same online Terrarium DEM tiles Terrain shading already fetches (no offline fallback — the plugin's DemSource has no public hook to route through the pmtiles:// protocol the offline basemap uses, so this quietly renders nothing without a network, same as Radar/the Wikipedia layer). A plain vector source/layer under MapLibre's own tile lifecycle, no manual refetch-on-move code needed. Thresholds are the plugin's own generic starting point, not yet tuned against real terrain. Labels skipped for now (font-name matching across the online/offline styles' own glyph sets adds real risk for a nice-to-have, not the actual ask).
This commit is contained in:
1 parent
b4a1c6c0cc
commit
fba8ca10a2
7 files changed
+140
-2
No files matched your search
+3
-1
@@ -357,7 +357,9 @@ function readCachedForecast() {
|
||||
}
|
||||
}
|
||||
|
||||
function firstSymbolLayerId(map) {
|
||||
// Exported: contour.js's own contour-line layers want the same
|
||||
// "sit above base fill/roads, below place labels" placement.
|
||||
export function firstSymbolLayerId(map) {
|
||||
const layers = map.getStyle()?.layers || [];
|
||||
const symbolLayer = layers.find((layer) => layer.type === "symbol");
|
||||
return symbolLayer ? symbolLayer.id : undefined;
|
||||
|
||||
Reference in new issue
Block a user