Map: ski lifts and cable cars (OpenMapTiles aerialway, which Liberty doesn't draw) as a line with topo cross ticks from z12, named from z13; night colors
This commit is contained in:
1 parent
3561cb2f45
commit
477f68f5b3
1 file changed
+19
-1
+19
-1
@@ -199,8 +199,23 @@ function protectedAreasAndTextures(style) {
|
|||||||
},
|
},
|
||||||
paint: { "icon-color": "#6b4f3a", "text-color": "#6b4f3a", "text-halo-color": "#ffffff", "text-halo-width": 1.5 },
|
paint: { "icon-color": "#6b4f3a", "text-color": "#6b4f3a", "text-halo-color": "#ffffff", "text-halo-width": 1.5 },
|
||||||
};
|
};
|
||||||
|
// Ski lifts and cable cars (Liberty draws none): a thin line with the
|
||||||
|
// topo map's cross ticks, the lift's name along it.
|
||||||
|
const aerialway = ["==", ["get", "class"], "aerialway"];
|
||||||
|
const lift = { type: "line", source: park.source, "source-layer": "transportation", minzoom: 12, filter: aerialway };
|
||||||
|
const lifts = [
|
||||||
|
{ ...lift, id: "aerialway", paint: { "line-color": "#4a4a4a", "line-width": 1.2 } },
|
||||||
|
{ ...lift, id: "aerialway_ticks", paint: { "line-color": "#4a4a4a", "line-width": 6, "line-dasharray": [0.2, 8] } },
|
||||||
|
{
|
||||||
|
id: "aerialway_name", type: "symbol", source: park.source, "source-layer": "transportation_name", minzoom: 13, filter: aerialway,
|
||||||
|
layout: { "symbol-placement": "line", "text-field": ["get", "name"], "text-font": ["Noto Sans Regular"], "text-size": 11, "text-offset": [0, 0.8] },
|
||||||
|
paint: { "text-color": "#4a4a4a", "text-halo-color": "#ffffff", "text-halo-width": 1.5 },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const firstSymbol = style.layers.findIndex((layer) => layer.type === "symbol");
|
||||||
|
style.layers.splice(firstSymbol === -1 ? style.layers.length : firstSymbol, 0, ...lifts.slice(0, 2));
|
||||||
const placeIndex = style.layers.findIndex((layer) => layer["source-layer"] === "place");
|
const placeIndex = style.layers.findIndex((layer) => layer["source-layer"] === "place");
|
||||||
style.layers.splice(placeIndex === -1 ? style.layers.length : placeIndex, 0, peaks, label);
|
style.layers.splice(placeIndex === -1 ? style.layers.length : placeIndex, 0, lifts[2], peaks, label);
|
||||||
return style;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,6 +346,9 @@ const NIGHT_PATCH = {
|
|||||||
landuse_military_outline: { "line-color": "#8a3a30" },
|
landuse_military_outline: { "line-color": "#8a3a30" },
|
||||||
park_tintband: { "line-color": "#2b3a26" },
|
park_tintband: { "line-color": "#2b3a26" },
|
||||||
park_label: { "text-color": "#8fae7a", "text-halo-color": NIGHT_GROUND },
|
park_label: { "text-color": "#8fae7a", "text-halo-color": NIGHT_GROUND },
|
||||||
|
aerialway: { "line-color": "#8a8f96" },
|
||||||
|
aerialway_ticks: { "line-color": "#8a8f96" },
|
||||||
|
aerialway_name: NIGHT_LABEL,
|
||||||
mountain_peak_label: { "icon-color": "#b8a48c", "text-color": "#b8a48c", "text-halo-color": NIGHT_GROUND },
|
mountain_peak_label: { "icon-color": "#b8a48c", "text-color": "#b8a48c", "text-halo-color": NIGHT_GROUND },
|
||||||
building: { "fill-color": "#262c32", "fill-outline-color": "#30373e" },
|
building: { "fill-color": "#262c32", "fill-outline-color": "#30373e" },
|
||||||
boundary_2: { "line-color": "#4a4f55" },
|
boundary_2: { "line-color": "#4a4f55" },
|
||||||
|
|||||||
Reference in new issue
Block a user