From 6510713cee33669c1dfb0693e1886362f26c8c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sun, 17 Sep 2023 01:51:17 -0700 Subject: [PATCH 1/2] Add vintage U.S. Route shield for historic routes (#922) * Added vintage U.S. Route shield for historic routes * Added banner to Historic U.S. Route shield * Generalize badge shield with crossbar --- icons/shield_badge_crossbar_2.svg | 4 ++++ icons/shield_badge_crossbar_3.svg | 4 ++++ src/js/shield_defs.js | 24 +++++++++++++++++++----- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 icons/shield_badge_crossbar_2.svg create mode 100644 icons/shield_badge_crossbar_3.svg diff --git a/icons/shield_badge_crossbar_2.svg b/icons/shield_badge_crossbar_2.svg new file mode 100644 index 000000000..be80b8769 --- /dev/null +++ b/icons/shield_badge_crossbar_2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/shield_badge_crossbar_3.svg b/icons/shield_badge_crossbar_3.svg new file mode 100644 index 000000000..5cdda03ce --- /dev/null +++ b/icons/shield_badge_crossbar_3.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index ef9d929a1..e4534a85b 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -767,6 +767,17 @@ export function loadShields() { }, }; + let badgeShieldCrossbar = { + spriteBlank: ["shield_badge_crossbar_2", "shield_badge_crossbar_3"], + textColor: Color.shields.black, + padding: { + left: 1, + right: 1, + top: 6, + bottom: 4, + }, + }; + // Default shields["default"] = { @@ -1181,11 +1192,14 @@ export function loadShields() { "BUS", ]); - shields["US:US:Historic"] = { - ...badgeShield, - textColor: Color.shields.brown, - colorLighten: Color.shields.brown, - }; + shields["US:US:Historic"] = banneredShield( + { + ...badgeShieldCrossbar, + textColor: Color.shields.brown, + colorLighten: Color.shields.brown, + }, + ["HIST"] + ); // Federal Agencies shields["US:BIA"] = { From e0519596901655838f2e72a5ed57628069295a63 Mon Sep 17 00:00:00 2001 From: Daniel Schep Date: Sun, 17 Sep 2023 12:42:35 -0400 Subject: [PATCH 2/2] Don't render one-way arrows on highway features that aren't rendered --- src/layer/oneway.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/layer/oneway.js b/src/layer/oneway.js index 47253b9c6..e8f50eb06 100644 --- a/src/layer/oneway.js +++ b/src/layer/oneway.js @@ -10,6 +10,7 @@ export const surface = { ["==", ["get", "oneway"], 1], ["!=", ["get", "ramp"], 1], ["!", ["in", ["get", "brunnel"], ["literal", ["bridge", "tunnel"]]]], + ["!", ["in", ["get", "class"], ["literal", ["path", "track"]]]], ], source: "openmaptiles", "source-layer": "transportation", @@ -73,6 +74,7 @@ export const tunnel = { ["==", ["get", "oneway"], 1], ["!=", ["get", "ramp"], 1], ["==", ["get", "brunnel"], "tunnel"], + ["!", ["in", ["get", "class"], ["literal", ["path", "track"]]]], ], paint: { "icon-opacity": 0.2, @@ -87,5 +89,6 @@ export const bridge = { ["==", ["get", "oneway"], 1], ["!=", ["get", "ramp"], 1], ["==", ["get", "brunnel"], "bridge"], + ["!", ["in", ["get", "class"], ["literal", ["path", "track"]]]], ], };