From 7c6d9752b363cab2b25e1c98f227ed2eebe74a19 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 1 Feb 2023 17:56:01 -0500 Subject: [PATCH 01/14] add aerialways --- src/constants/color.js | 2 + src/js/legend_config.js | 5 ++ src/layer/aerialway.js | 112 ++++++++++++++++++++++++++++++ src/layer/index.js | 5 ++ src/layer/transportation_label.js | 47 +++++++------ 5 files changed, 150 insertions(+), 21 deletions(-) create mode 100644 src/layer/aerialway.js diff --git a/src/constants/color.js b/src/constants/color.js index e574b411b..c670d760e 100644 --- a/src/constants/color.js +++ b/src/constants/color.js @@ -20,6 +20,8 @@ export const parkOutline = "hsla(136, 41%, 70%, 50%)"; export const parkLabel = "hsl(136, 71%, 29%)"; export const parkLabelHalo = "hsl(90, 27%, 94%)"; +export const aerialwayLine = "hsl(350, 70%, 50%)"; + export const airportFill = "hsl(250, 41%, 95%)"; export const airportOutline = "hsl(250, 41%, 79%)"; export const airportRunway = "hsl(250, 41%, 79%)"; diff --git a/src/js/legend_config.js b/src/js/legend_config.js index 02e9170e3..49b589be2 100644 --- a/src/js/legend_config.js +++ b/src/js/legend_config.js @@ -13,6 +13,7 @@ import * as ParkLayers from "../layer/park.js"; import * as BuildingLayers from "../layer/building.js"; import * as WaterLayers from "../layer/water.js"; import * as FerryLayers from "../layer/ferry.js"; +import * as AerialwayLayers from "../layer/aerialway.js"; export const sections = [ { @@ -40,6 +41,10 @@ export const sections = [ name: "Railroads", entries: RailLayers.legendEntries, }, + { + name: "Aerialways", + entries: AerialwayLayers.legendEntries, + }, { name: "Aviation", entries: AerowayLayers.legendEntries, diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js new file mode 100644 index 000000000..7063c5b8b --- /dev/null +++ b/src/layer/aerialway.js @@ -0,0 +1,112 @@ +"use strict"; + +import * as Color from "../constants/color.js"; + +// Exponent base for inter-zoom interpolation +let aerialwayExp = 1.2; + +export const lift = { + id: "lift", + type: "line", + paint: { + "line-color": Color.aerialwayLine, + "line-width": [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 1, + 20, + 2, + ], + "line-gap-width": [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 0.5, + 20, + 2, + ], + }, + filter: [ + "all", + ["==", ["get", "class"], "aerialway"], + [ + "in", + ["get", "subclass"], + ["literal", ["chair_lift", "cable_car", "gondola", "mixed_lift"]], + ], + ], + layout: { + visibility: "visible", + }, + source: "openmaptiles", + "source-layer": "transportation", +}; + +export const dragLift = { + id: "drag_lift", + type: "line", + paint: { + "line-color": Color.aerialwayLine, + "line-width": [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 1.5, + 20, + 6, + ], + "line-dasharray": [2, 0.5], + }, + filter: [ + "all", + ["==", ["get", "class"], "aerialway"], + [ + "in", + ["get", "subclass"], + ["literal", ["drag_lift", "platter", "j-bar", "t-bar"]], + ], + ], + layout: { + visibility: "visible", + }, + source: "openmaptiles", + "source-layer": "transportation", +}; + +export const casing = { + id: "aerialway_casing", + type: "line", + paint: { + "line-color": Color.backgroundFill, + "line-width": [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 2.5, + 20, + 10, + ], + }, + filter: ["==", ["get", "class"], "aerialway"], + layout: { + visibility: "visible", + }, + source: "openmaptiles", + "source-layer": "transportation", +}; + +export const legendEntries = [ + { + description: "Aerial tramway or chairlift", + layers: [lift.id], + }, + { + description: "Drag lift", + layers: [dragLift.id], + }, +]; diff --git a/src/layer/index.js b/src/layer/index.js index 2cbd84e06..cffd5a4fc 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -2,6 +2,7 @@ import * as Label from "../constants/label.js"; +import * as lyrAerialway from "./aerialway.js"; import * as lyrAeroway from "./aeroway.js"; import * as lyrBackground from "./background.js"; import * as lyrBoundary from "./boundary.js"; @@ -199,6 +200,10 @@ export function build(locales) { layers.push( //The labels at the end of the list draw on top of the layers at the beginning. + lyrAerialway.casing, + lyrAerialway.dragLift, + lyrAerialway.lift, + lyrWater.waterwayLabel, lyrTransportationLabel.bridgeSpacer, diff --git a/src/layer/transportation_label.js b/src/layer/transportation_label.js index e3f45f4a1..d92afdb0b 100644 --- a/src/layer/transportation_label.js +++ b/src/layer/transportation_label.js @@ -3,7 +3,7 @@ import * as Label from "../constants/label.js"; import * as Color from "../constants/color.js"; -const highwaySelector = ["match", ["get", "class"]]; +const classSelector = ["match", ["get", "class"]]; const motorwayToTrunk = ["motorway", "trunk"]; const motorwayToPrimary = [...motorwayToTrunk, "primary"]; @@ -25,17 +25,19 @@ export const label = { type: "symbol", paint: { "text-color": [ - ...highwaySelector, + ...classSelector, majorConstruction, "maroon", minorConstruction, "slategray", "ferry", Color.waterLineBold, + "aerialway", + Color.aerialwayLine, "#333", ], "text-halo-color": [ - ...highwaySelector, + ...classSelector, "ferry", Color.waterFill, Color.backgroundFill, @@ -45,17 +47,17 @@ export const label = { "text-opacity": [ "step", ["zoom"], - [...highwaySelector, "motorway", 1, 0], + [...classSelector, "motorway", 1, 0], 10, - [...highwaySelector, motorwayToTrunk, 1, 0], + [...classSelector, motorwayToTrunk, 1, 0], 11, - [...highwaySelector, motorwayToPrimary, 1, "ferry", 1, 0], + [...classSelector, motorwayToPrimary, 1, "ferry", 1, 0], 12, - [...highwaySelector, motorwayToSecondary, 1, "ferry", 1, 0], + [...classSelector, motorwayToSecondary, 1, ["ferry", "aerialway"], 1, 0], 13, - [...highwaySelector, motorwayToMinor, 1, "ferry", 1, 0], + [...classSelector, motorwayToMinor, 1, ["ferry", "aerialway"], 1, 0], 14, - [...highwaySelector, motorwayToService, 1, "ferry", 1, 0], + [...classSelector, motorwayToService, 1, ["ferry", "aerialway"], 1, 0], 15, 1, ], @@ -70,13 +72,14 @@ export const label = { ...majorConstruction, ...minorConstruction, "ferry", + "aerialway", ], ], ], layout: { "text-font": [ - ...highwaySelector, - "ferry", + ...classSelector, + ["ferry", "aerialway"], ["literal", ["OpenHistorical Italic"]], ["literal", ["OpenHistorical"]], ], @@ -88,33 +91,35 @@ export const label = { ["zoom"], 12, 16, - [...highwaySelector, motorwayToTrunk, 10, 12], + [...classSelector, motorwayToTrunk, 10, 12], 17, - [...highwaySelector, motorwayToSecondary, 10, 12], + [...classSelector, motorwayToSecondary, 10, 12], ], "text-anchor": [ "step", ["zoom"], "bottom", 16, - [...highwaySelector, motorwayToTrunk, "center", "bottom"], + [...classSelector, motorwayToTrunk, "center", "bottom"], 17, - [...highwaySelector, motorwayToSecondary, "center", "bottom"], + [...classSelector, motorwayToSecondary, "center", "bottom"], ], "symbol-sort-key": [ // TODO busway - ...highwaySelector, - "motorway", + ...classSelector, + "aerialway", 0, - "trunk", + "motorway", 1, - ["primary", "ferry"], + "trunk", 2, - "secondary", + ["primary", "ferry"], 3, - ["tertiary", "minor"], + "secondary", 4, + ["tertiary", "minor"], 5, + 6, ], }, source: "openmaptiles", From 7242b75fee8e13e0036a92b72ed537983fbd1512 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 1 Feb 2023 19:40:28 -0500 Subject: [PATCH 02/14] adjust aerialway width --- src/layer/aerialway.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js index 7063c5b8b..b67faf675 100644 --- a/src/layer/aerialway.js +++ b/src/layer/aerialway.js @@ -15,9 +15,9 @@ export const lift = { ["exponential", aerialwayExp], ["zoom"], 12, - 1, + 0.6, 20, - 2, + 2.4, ], "line-gap-width": [ "interpolate", From 3082252ec38cd92728f029a76a9de5e0eb3ce6c9 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 1 Feb 2023 20:21:17 -0500 Subject: [PATCH 03/14] rename aerialway legend header --- src/js/legend_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/legend_config.js b/src/js/legend_config.js index 49b589be2..645050679 100644 --- a/src/js/legend_config.js +++ b/src/js/legend_config.js @@ -42,7 +42,7 @@ export const sections = [ entries: RailLayers.legendEntries, }, { - name: "Aerialways", + name: "Aerial lifts", entries: AerialwayLayers.legendEntries, }, { From f5ab26b2dc5ee6ffc884e9afebe7d33ca1ddc602 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Fri, 3 Feb 2023 15:16:45 -0500 Subject: [PATCH 04/14] change aerialways to purple and move drag lifts below bridges --- src/constants/color.js | 3 ++- src/layer/aerialway.js | 45 ++++++++++++++++++++++++++++--- src/layer/index.js | 5 ++-- src/layer/transportation_label.js | 2 +- 4 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/constants/color.js b/src/constants/color.js index c670d760e..9a02c24ff 100644 --- a/src/constants/color.js +++ b/src/constants/color.js @@ -20,7 +20,8 @@ export const parkOutline = "hsla(136, 41%, 70%, 50%)"; export const parkLabel = "hsl(136, 71%, 29%)"; export const parkLabelHalo = "hsl(90, 27%, 94%)"; -export const aerialwayLine = "hsl(350, 70%, 50%)"; +export const aerialwayLine = "hsl(250, 41%, 59%)"; +export const aerialwayLabel = "hsl(250, 71%, 29%)"; export const airportFill = "hsl(250, 41%, 95%)"; export const airportOutline = "hsl(250, 41%, 79%)"; diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js index b67faf675..0d1de1593 100644 --- a/src/layer/aerialway.js +++ b/src/layer/aerialway.js @@ -77,8 +77,8 @@ export const dragLift = { "source-layer": "transportation", }; -export const casing = { - id: "aerialway_casing", +export const liftCasing = { + id: "lift_casing", type: "line", paint: { "line-color": Color.backgroundFill, @@ -92,7 +92,46 @@ export const casing = { 10, ], }, - filter: ["==", ["get", "class"], "aerialway"], + filter: [ + "all", + ["==", ["get", "class"], "aerialway"], + [ + "in", + ["get", "subclass"], + ["literal", ["chair_lift", "cable_car", "gondola", "mixed_lift"]], + ], + ], + layout: { + visibility: "visible", + }, + source: "openmaptiles", + "source-layer": "transportation", +}; + +export const dragLiftCasing = { + id: "lift_casing", + type: "line", + paint: { + "line-color": Color.backgroundFill, + "line-width": [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 2.5, + 20, + 10, + ], + }, + filter: [ + "all", + ["==", ["get", "class"], "aerialway"], + [ + "in", + ["get", "subclass"], + ["literal", ["drag_lift", "platter", "j-bar", "t-bar"]], + ], + ], layout: { visibility: "visible", }, diff --git a/src/layer/index.js b/src/layer/index.js index cffd5a4fc..5cc7d6450 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -194,14 +194,15 @@ export function build(locales) { lyrOneway.bridge, lyrOneway.bridgeLink, + lyrAerialway.dragLiftCasing, + lyrAerialway.dragLift, ]; layers.push(...lyrRail.getLayerSeparatedBridgeLayers(bridgeLayers)); layers.push( //The labels at the end of the list draw on top of the layers at the beginning. - lyrAerialway.casing, - lyrAerialway.dragLift, + lyrAerialway.liftCasing, lyrAerialway.lift, lyrWater.waterwayLabel, diff --git a/src/layer/transportation_label.js b/src/layer/transportation_label.js index d92afdb0b..2454c632d 100644 --- a/src/layer/transportation_label.js +++ b/src/layer/transportation_label.js @@ -33,7 +33,7 @@ export const label = { "ferry", Color.waterLineBold, "aerialway", - Color.aerialwayLine, + Color.aerialwayLabel, "#333", ], "text-halo-color": [ From 25fdea5d4cc38a12f95566394403bc08b4f376bb Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Fri, 3 Feb 2023 15:43:20 -0500 Subject: [PATCH 05/14] remove casing from drag lifts --- src/layer/aerialway.js | 31 ------------------------------- src/layer/index.js | 1 - 2 files changed, 32 deletions(-) diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js index 0d1de1593..4c83933c7 100644 --- a/src/layer/aerialway.js +++ b/src/layer/aerialway.js @@ -108,37 +108,6 @@ export const liftCasing = { "source-layer": "transportation", }; -export const dragLiftCasing = { - id: "lift_casing", - type: "line", - paint: { - "line-color": Color.backgroundFill, - "line-width": [ - "interpolate", - ["exponential", aerialwayExp], - ["zoom"], - 12, - 2.5, - 20, - 10, - ], - }, - filter: [ - "all", - ["==", ["get", "class"], "aerialway"], - [ - "in", - ["get", "subclass"], - ["literal", ["drag_lift", "platter", "j-bar", "t-bar"]], - ], - ], - layout: { - visibility: "visible", - }, - source: "openmaptiles", - "source-layer": "transportation", -}; - export const legendEntries = [ { description: "Aerial tramway or chairlift", diff --git a/src/layer/index.js b/src/layer/index.js index 5cc7d6450..0e73100be 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -194,7 +194,6 @@ export function build(locales) { lyrOneway.bridge, lyrOneway.bridgeLink, - lyrAerialway.dragLiftCasing, lyrAerialway.dragLift, ]; From d3762bc01143e8c415629594b34e6d50d64ea0ae Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Fri, 3 Feb 2023 16:07:11 -0500 Subject: [PATCH 06/14] bigger aerialway gap width on high zooms --- src/layer/aerialway.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js index 4c83933c7..5c0016c24 100644 --- a/src/layer/aerialway.js +++ b/src/layer/aerialway.js @@ -16,6 +16,8 @@ export const lift = { ["zoom"], 12, 0.6, + 16, + 1.2, 20, 2.4, ], @@ -25,8 +27,10 @@ export const lift = { ["zoom"], 12, 0.5, + 16, + 1, 20, - 2, + 16, ], }, filter: [ @@ -56,6 +60,8 @@ export const dragLift = { ["zoom"], 12, 1.5, + 16, + 3, 20, 6, ], @@ -87,9 +93,22 @@ export const liftCasing = { ["exponential", aerialwayExp], ["zoom"], 12, - 2.5, + 1, + 16, + 2, + 20, + 4, + ], + "line-gap-width": [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 0.01, + 16, + 0.01, 20, - 10, + 14.4, ], }, filter: [ From 7b7ca1f4565e681eac6740f7a38ab79dc9a9fc64 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Fri, 3 Feb 2023 16:29:13 -0500 Subject: [PATCH 07/14] add taginfo for aerialways --- scripts/taginfo_template.json | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/scripts/taginfo_template.json b/scripts/taginfo_template.json index 9e099e4da..bf4caef21 100644 --- a/scripts/taginfo_template.json +++ b/scripts/taginfo_template.json @@ -154,6 +154,62 @@ "doc_url": "https://openmaptiles.org/schema/#class", "icon_url": "https://raw.githubusercontent.com/ZeLonewolf/openstreetmap-americana/main/icons/poi_military_plane.svg" }, + { + "key": "aerialway", + "value": "cable_car", + "object_types": ["way"], + "description": "Cable cars are represented by two parallel purple lines.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "chair_lift", + "object_types": ["way"], + "description": "Chairlifts are represented by two parallel purple lines.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "gondola", + "object_types": ["way"], + "description": "Aerial gondolas are represented by two parallel purple lines.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "mixed_lift", + "object_types": ["way"], + "description": "Mixed aerial lifts are represented by two parallel purple lines.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "drag_lift", + "object_types": ["way"], + "description": "Drag lifts are represented by a thick dashed purple line.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "platter", + "object_types": ["way"], + "description": "Platter lifts are represented by a thick dashed purple line.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "j-bar", + "object_types": ["way"], + "description": "J-bar lifts are represented by a thick dashed purple line.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, + { + "key": "aerialway", + "value": "t-bar", + "object_types": ["way"], + "description": "T-bar lifts are represented by a thick dashed purple line.", + "doc_url": "https://openmaptiles.org/schema/#aerialway" + }, { "key": "aeroway", "value": "runway", From de908977542116b0e936f0fca1e13f2d5bc11de0 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Fri, 3 Feb 2023 20:38:39 -0500 Subject: [PATCH 08/14] thinner drag lift line --- src/layer/aerialway.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js index 5c0016c24..331a5208e 100644 --- a/src/layer/aerialway.js +++ b/src/layer/aerialway.js @@ -59,13 +59,13 @@ export const dragLift = { ["exponential", aerialwayExp], ["zoom"], 12, - 1.5, + 0.75, 16, - 3, + 1.5, 20, - 6, + 3, ], - "line-dasharray": [2, 0.5], + "line-dasharray": [5, 0.5], }, filter: [ "all", From 5d4bcb033b639bbebd4aa5c91462a6ee0ee4907b Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Mon, 6 Feb 2023 13:33:05 -0500 Subject: [PATCH 09/14] transition aerialways at z15 from single to double line --- src/layer/aerialway.js | 133 +++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 64 deletions(-) diff --git a/src/layer/aerialway.js b/src/layer/aerialway.js index 331a5208e..fead3f0ef 100644 --- a/src/layer/aerialway.js +++ b/src/layer/aerialway.js @@ -5,33 +5,67 @@ import * as Color from "../constants/color.js"; // Exponent base for inter-zoom interpolation let aerialwayExp = 1.2; +let lineWidth = [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 1.2, + 14.9999, + 2.4, + 15, + 1.2, + 16, + 1.2, + 20, + 2.4, +]; +let lineGapWidth = [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 0, + 15, + 0, + 16, + 1, + 20, + 16, +]; + +let casingLineWidth = [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 2, + 15.9999, + 4, + 16, + 2, + 20, + 4, +]; +let casingLineGapWidth = [ + "interpolate", + ["exponential", aerialwayExp], + ["zoom"], + 12, + 0, + 16, + 0, + 20, + 14.4, +]; + export const lift = { id: "lift", type: "line", paint: { "line-color": Color.aerialwayLine, - "line-width": [ - "interpolate", - ["exponential", aerialwayExp], - ["zoom"], - 12, - 0.6, - 16, - 1.2, - 20, - 2.4, - ], - "line-gap-width": [ - "interpolate", - ["exponential", aerialwayExp], - ["zoom"], - 12, - 0.5, - 16, - 1, - 20, - 16, - ], + "line-width": lineWidth, + "line-gap-width": lineGapWidth, }, filter: [ "all", @@ -49,23 +83,13 @@ export const lift = { "source-layer": "transportation", }; -export const dragLift = { - id: "drag_lift", +export const liftCasing = { + id: "lift_casing", type: "line", paint: { - "line-color": Color.aerialwayLine, - "line-width": [ - "interpolate", - ["exponential", aerialwayExp], - ["zoom"], - 12, - 0.75, - 16, - 1.5, - 20, - 3, - ], - "line-dasharray": [5, 0.5], + "line-color": Color.backgroundFill, + "line-width": casingLineWidth, + "line-gap-width": casingLineGapWidth, }, filter: [ "all", @@ -73,7 +97,7 @@ export const dragLift = { [ "in", ["get", "subclass"], - ["literal", ["drag_lift", "platter", "j-bar", "t-bar"]], + ["literal", ["chair_lift", "cable_car", "gondola", "mixed_lift"]], ], ], layout: { @@ -83,33 +107,14 @@ export const dragLift = { "source-layer": "transportation", }; -export const liftCasing = { - id: "lift_casing", +export const dragLift = { + id: "drag_lift", type: "line", paint: { - "line-color": Color.backgroundFill, - "line-width": [ - "interpolate", - ["exponential", aerialwayExp], - ["zoom"], - 12, - 1, - 16, - 2, - 20, - 4, - ], - "line-gap-width": [ - "interpolate", - ["exponential", aerialwayExp], - ["zoom"], - 12, - 0.01, - 16, - 0.01, - 20, - 14.4, - ], + "line-color": Color.aerialwayLine, + "line-width": lineWidth, + "line-gap-width": lineGapWidth, + "line-dasharray": [5, 1], }, filter: [ "all", @@ -117,7 +122,7 @@ export const liftCasing = { [ "in", ["get", "subclass"], - ["literal", ["chair_lift", "cable_car", "gondola", "mixed_lift"]], + ["literal", ["drag_lift", "platter", "j-bar", "t-bar"]], ], ], layout: { From 261695c43f1d74bb1ea31dc1e51636f261f4bc0d Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Tue, 7 Feb 2023 15:05:49 -0500 Subject: [PATCH 10/14] move drag lift out of bridge layers --- src/layer/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layer/index.js b/src/layer/index.js index 0e73100be..15a81e36b 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -136,7 +136,9 @@ export function build(locales) { lyrRail.railway.fill(), lyrOneway.road, - lyrOneway.link + lyrOneway.link, + + lyrAerialway.dragLift ); layers.push(lyrBuilding.building); @@ -194,7 +196,6 @@ export function build(locales) { lyrOneway.bridge, lyrOneway.bridgeLink, - lyrAerialway.dragLift, ]; layers.push(...lyrRail.getLayerSeparatedBridgeLayers(bridgeLayers)); From 71b2cc582c22b61b368045c65c633970e2289601 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 26 Feb 2023 10:35:05 -0800 Subject: [PATCH 11/14] add aerialway text offset --- src/layer/transportation_label.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/layer/transportation_label.js b/src/layer/transportation_label.js index 2454c632d..096de0abe 100644 --- a/src/layer/transportation_label.js +++ b/src/layer/transportation_label.js @@ -104,6 +104,27 @@ export const label = { 17, [...classSelector, motorwayToSecondary, "center", "bottom"], ], + "text-offset": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 15, + ["literal", [0, 0]], + 16, + [ + ...classSelector, + "aerialway", + ["literal", [0, 0.2]], + ["literal", [0, 0]], + ], + 20, + [ + ...classSelector, + "aerialway", + ["literal", [0, 0.8]], + ["literal", [0, 0]], + ], + ], "symbol-sort-key": [ // TODO busway ...classSelector, From 5b2158668d5d4e1ae92cf46b57e780493be40496 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 5 Mar 2023 21:47:22 -0500 Subject: [PATCH 12/14] negate text offset --- src/layer/transportation_label.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layer/transportation_label.js b/src/layer/transportation_label.js index 096de0abe..41b0d2b40 100644 --- a/src/layer/transportation_label.js +++ b/src/layer/transportation_label.js @@ -114,14 +114,14 @@ export const label = { [ ...classSelector, "aerialway", - ["literal", [0, 0.2]], + ["literal", [0, -0.2]], ["literal", [0, 0]], ], 20, [ ...classSelector, "aerialway", - ["literal", [0, 0.8]], + ["literal", [0, -0.8]], ["literal", [0, 0]], ], ], From c14f46735e66ea91dc0d0c80b00db28382fdff9f Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 5 Mar 2023 22:07:41 -0500 Subject: [PATCH 13/14] change aerialways to magenta --- scripts/taginfo_template.json | 16 ++++++++-------- src/constants/color.js | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/taginfo_template.json b/scripts/taginfo_template.json index bf4caef21..5d7a65eb7 100644 --- a/scripts/taginfo_template.json +++ b/scripts/taginfo_template.json @@ -158,56 +158,56 @@ "key": "aerialway", "value": "cable_car", "object_types": ["way"], - "description": "Cable cars are represented by two parallel purple lines.", + "description": "Cable cars are represented by a solid magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "chair_lift", "object_types": ["way"], - "description": "Chairlifts are represented by two parallel purple lines.", + "description": "Chairlifts are represented by a solid magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "gondola", "object_types": ["way"], - "description": "Aerial gondolas are represented by two parallel purple lines.", + "description": "Aerial gondolas are represented by a solid magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "mixed_lift", "object_types": ["way"], - "description": "Mixed aerial lifts are represented by two parallel purple lines.", + "description": "Mixed aerial lifts are represented by a solid magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "drag_lift", "object_types": ["way"], - "description": "Drag lifts are represented by a thick dashed purple line.", + "description": "Drag lifts are represented by a dashed magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "platter", "object_types": ["way"], - "description": "Platter lifts are represented by a thick dashed purple line.", + "description": "Platter lifts are represented by a dashed magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "j-bar", "object_types": ["way"], - "description": "J-bar lifts are represented by a thick dashed purple line.", + "description": "J-bar lifts are represented by a dashed magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { "key": "aerialway", "value": "t-bar", "object_types": ["way"], - "description": "T-bar lifts are represented by a thick dashed purple line.", + "description": "T-bar lifts are represented by a dashed magenta line that splits in two at high zoom.", "doc_url": "https://openmaptiles.org/schema/#aerialway" }, { diff --git a/src/constants/color.js b/src/constants/color.js index 4ce0980b8..c883fbcfa 100644 --- a/src/constants/color.js +++ b/src/constants/color.js @@ -20,8 +20,8 @@ export const parkOutline = "hsla(136, 41%, 70%, 50%)"; export const parkLabel = "hsl(136, 71%, 29%)"; export const parkLabelHalo = "hsl(90, 27%, 94%)"; -export const aerialwayLine = "hsl(250, 41%, 59%)"; -export const aerialwayLabel = "hsl(250, 71%, 29%)"; +export const aerialwayLine = "hsl(310, 41%, 59%)"; +export const aerialwayLabel = "hsl(310, 71%, 29%)"; export const airportFill = "hsl(250, 41%, 95%)"; export const airportOutline = "hsl(250, 41%, 79%)"; From 81a41fc49a703eb7d8841666a5d3e66f9a3a2dfd Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Tue, 7 Mar 2023 16:58:41 -0500 Subject: [PATCH 14/14] change aerialway text-anchor to center --- src/layer/transportation_label.js | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/layer/transportation_label.js b/src/layer/transportation_label.js index 41b0d2b40..af7c087fd 100644 --- a/src/layer/transportation_label.js +++ b/src/layer/transportation_label.js @@ -98,30 +98,49 @@ export const label = { "text-anchor": [ "step", ["zoom"], - "bottom", + [...classSelector, "aerialway", "center", "bottom"], 16, - [...classSelector, motorwayToTrunk, "center", "bottom"], + [ + ...classSelector, + "aerialway", + "center", + motorwayToTrunk, + "center", + "bottom", + ], 17, - [...classSelector, motorwayToSecondary, "center", "bottom"], + [ + ...classSelector, + "aerialway", + "center", + motorwayToSecondary, + "center", + "bottom", + ], ], "text-offset": [ "interpolate", ["exponential", 1.2], ["zoom"], 15, - ["literal", [0, 0]], + [ + ...classSelector, + "aerialway", + ["literal", [0, -0.7]], + ["literal", [0, 0]], + ], 16, [ ...classSelector, "aerialway", - ["literal", [0, -0.2]], + ["literal", [0, -0.9]], ["literal", [0, 0]], ], 20, [ ...classSelector, "aerialway", - ["literal", [0, -0.8]], + ["literal", [0, -1.5]], ["literal", [0, 0]], ], ],