diff --git a/public/js/map_themes.js b/public/js/map_themes.js index 78fb285..97d41d1 100644 --- a/public/js/map_themes.js +++ b/public/js/map_themes.js @@ -199,8 +199,23 @@ function protectedAreasAndTextures(style) { }, 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"); - 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; } @@ -331,6 +346,9 @@ const NIGHT_PATCH = { landuse_military_outline: { "line-color": "#8a3a30" }, park_tintband: { "line-color": "#2b3a26" }, 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 }, building: { "fill-color": "#262c32", "fill-outline-color": "#30373e" }, boundary_2: { "line-color": "#4a4f55" },