Skip to content

Commit

Permalink
add guided busways
Browse files Browse the repository at this point in the history
  • Loading branch information
claysmalley committed Apr 6, 2023
1 parent c1a426b commit 2fb1bec
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions src/layer/road.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,15 @@ const opacity = [
minZoomTertiary,
[
...classSelector,
["motorway", "trunk", "primary", "secondary", "tertiary", "busway"],
[
"motorway",
"trunk",
"primary",
"secondary",
"tertiary",
"busway",
"bus_guideway",
],
1,
0,
],
Expand Down Expand Up @@ -124,6 +132,7 @@ function filterRoad(brunnel, constraints) {
"secondary",
"tertiary",
"busway",
"bus_guideway",
"minor",
"service",
],
Expand Down Expand Up @@ -181,7 +190,7 @@ const widthFactor = [
[...linkSelector, 0.45, 0.9],
"secondary",
[...linkSelector, 0.3, [...expresswaySelector, 0.7, 0.6]],
["tertiary", "busway"],
["tertiary", "busway", "bus_guideway"],
[...linkSelector, 0.25, 0.5],
"minor",
0.3,
Expand Down Expand Up @@ -240,7 +249,7 @@ const roadCasingColorTunnel = [
],
`hsl(${roadHue}, 41%, 80%)`,
],
["primary", "secondary", "tertiary", "busway"],
["primary", "secondary", "tertiary", "busway", "bus_guideway"],
"hsl(0, 0%, 80%)",
"hsl(0, 0%, 90%)",
],
Expand Down Expand Up @@ -288,7 +297,7 @@ const roadFillColorTunnel = [
`hsl(${tollRoadHue}, 77%, 90%)`,
`hsl(${roadHue}, 77%, 90%)`,
],
"busway",
["busway", "bus_guideway"],
`hsl(${buswayHue}, 25%, 93%)`,
[
...tollSelector,
Expand Down Expand Up @@ -531,7 +540,10 @@ class RoadSimpleFill extends Road {
[
"in",
getClass,
["literal", ["primary", "secondary", "tertiary", "busway"]],
[
"literal",
["primary", "secondary", "tertiary", "busway", "bus_guideway"],
],
],
isExpressway,
],
Expand Down Expand Up @@ -878,7 +890,11 @@ class TertiaryExpressway extends Tertiary {
class Busway extends Tertiary {
constructor() {
super();
this.constraints = ["==", getClass, "busway"];
this.constraints = [
"in",
getClass,
["literal", ["busway", "bus_guideway"]],
];

this.minZoomFill = minZoomTertiary;
this.minZoomCasing = minZoomTertiary;
Expand Down

0 comments on commit 2fb1bec

Please sign in to comment.