From 81e0836adbfda56771076a24322554b2a3acf17f Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Thu, 16 May 2024 21:30:10 -0400 Subject: [PATCH 1/7] Add shield for Inner Loop, Rochester, NY --- src/js/shield_defs.js | 10 ++++++++++ src/shieldtest.js | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 4cd44e443..71f49ea84 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -1804,6 +1804,13 @@ export function loadShields() { }, }; shields["US:NY:Truck"] = banneredShield(shields["US:NY"], ["TRK"]); + shields["US:NY:Inner_Loop"] = trapezoidDownShield( + 10, + Color.shields.white, + Color.shields.black, + Color.shields.black, + 4 + ); shields["US:NY:Thruway"] = { noref: { spriteBlank: "shield_us_ny_thruway", @@ -3856,6 +3863,9 @@ export function loadShields() { }, }; + shields["US:NY:Inner_Loop"].refsByName = { + "Inner Loop": "LOOP", + }; shields["US:NY:Parkway"].refsByName = { "Bear Mountain State Parkway": "BMP", "Bronx River Parkway": "BRP", diff --git a/src/shieldtest.js b/src/shieldtest.js index 43ee5b361..9f354b97b 100644 --- a/src/shieldtest.js +++ b/src/shieldtest.js @@ -347,6 +347,10 @@ const iterShields = function* () { network: "US:NH:Turnpike", names: ["Blue Star Turnpike", "Everett Turnpike", "Spaulding Turnpike"], }; + yield { + network: "US:NY:Inner_Loop", + names: ["Inner Loop"], + }; }; const renderAllShields = async () => { From 1b3799d6b114f47c97acb2ebd34f9d10df7f7e75 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 19 May 2024 19:34:06 -0400 Subject: [PATCH 2/7] Use new ref override for Rochester Inner Loop shield definition --- src/js/shield_defs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 71f49ea84..85de4abf5 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -1811,6 +1811,7 @@ export function loadShields() { Color.shields.black, 4 ); + shields["US:NY:Inner_Loop"].ref = "LOOP"; shields["US:NY:Thruway"] = { noref: { spriteBlank: "shield_us_ny_thruway", @@ -3863,9 +3864,6 @@ export function loadShields() { }, }; - shields["US:NY:Inner_Loop"].refsByName = { - "Inner Loop": "LOOP", - }; shields["US:NY:Parkway"].refsByName = { "Bear Mountain State Parkway": "BMP", "Bronx River Parkway": "BRP", From c06cedfbb818ffab47cfa5946d0c426b5a61ff44 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Tue, 28 May 2024 16:44:08 -0400 Subject: [PATCH 3/7] change padding values for Rochester Inner Loop shield --- src/js/shield_defs.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 9edd3b3e8..724f6afd6 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -1804,13 +1804,21 @@ export function loadShields() { }, }; shields["US:NY:Truck"] = banneredShield(shields["US:NY"], ["TRK"]); - shields["US:NY:Inner_Loop"] = trapezoidDownShield( - 10, - Color.shields.white, - Color.shields.black, - Color.shields.black, - 4 - ); + shields["US:NY:Inner_Loop"] = { + ...trapezoidDownShield( + 10, + Color.shields.white, + Color.shields.black, + Color.shields.black, + 4 + ), + padding: { + left: 4, + right: 4, + top: 3, + bottom: 3, + }, + }; shields["US:NY:Inner_Loop"].ref = "LOOP"; shields["US:NY:Thruway"] = { noref: { From af31fec47f2eab3e4741a45e6bcd93d61ef7e768 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sat, 1 Jun 2024 16:38:33 -0400 Subject: [PATCH 4/7] feat: add region boundaries This adds rendering support for `admin_level=5` --- src/layer/boundary.js | 55 +++++++++++++++++++++++++++++++++++++++++++ src/layer/index.js | 2 ++ 2 files changed, 57 insertions(+) diff --git a/src/layer/boundary.js b/src/layer/boundary.js index cab85a6a6..a02c81e59 100644 --- a/src/layer/boundary.js +++ b/src/layer/boundary.js @@ -78,6 +78,57 @@ export const county = { "source-layer": "boundary", }; +export const regionCasing = { + id: "boundary_region_casing", + type: "line", + paint: { + "line-color": Color.borderCasing, + "line-width": { + stops: [ + [11, 5], + [12, 6], + ], + }, + }, + filter: [ + "all", + ["==", ["get", "admin_level"], 5], + ["==", ["get", "disputed"], 0], + ["==", ["get", "maritime"], 0], + ], + minzoom: 8, + layout: { + "line-join": "round", + visibility: "visible", + }, + source: "openmaptiles", + "source-layer": "boundary", +}; + +export const region = { + id: "boundary_region", + type: "line", + paint: { + "line-color": Color.border, + "line-dasharray": [5, 4], + "line-width": 1, + "line-offset": 0, + }, + filter: [ + "all", + ["==", ["get", "admin_level"], 5], + ["==", ["get", "disputed"], 0], + ["==", ["get", "maritime"], 0], + ], + minzoom: 6, + layout: { + "line-join": "round", + visibility: "visible", + }, + source: "openmaptiles", + "source-layer": "boundary", +}; + export const stateCasing = { id: "boundary_state_casing", type: "line", @@ -322,6 +373,10 @@ export const legendEntries = [ description: "County or county-equivalent", layers: [county.id, countyCasing.id], }, + { + description: "Region", + layers: [region.id, regionCasing.id], + }, { description: "City, town, or village", layers: [city.id], diff --git a/src/layer/index.js b/src/layer/index.js index 95fada71d..740eb6061 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -37,6 +37,7 @@ export function build(locales) { lyrPark.parkFill, lyrBoundary.countyCasing, + lyrBoundary.regionCasing, lyrBoundary.stateCasing, lyrBoundary.countryCasing, @@ -52,6 +53,7 @@ export function build(locales) { lyrBoundary.city, lyrBoundary.county, + lyrBoundary.region, lyrBoundary.state, lyrBoundary.country, From c918c8969c14a88531e07c21b23cc4d4b6ee8847 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sat, 1 Jun 2024 16:43:15 -0400 Subject: [PATCH 5/7] Adjust casing zoom layers --- src/layer/boundary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layer/boundary.js b/src/layer/boundary.js index a02c81e59..b36d6eeec 100644 --- a/src/layer/boundary.js +++ b/src/layer/boundary.js @@ -85,8 +85,8 @@ export const regionCasing = { "line-color": Color.borderCasing, "line-width": { stops: [ - [11, 5], - [12, 6], + [8, 5], + [9, 6], ], }, }, From cded92d9a6a169ed0b0b5815f698fde70738b24b Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 2 Jun 2024 19:41:45 -0400 Subject: [PATCH 6/7] Add Madagascar national route shields --- doc-img/shield_map_world.svg | 1 + src/js/shield_defs.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc-img/shield_map_world.svg b/doc-img/shield_map_world.svg index ded937405..f943d2478 100644 --- a/doc-img/shield_map_world.svg +++ b/doc-img/shield_map_world.svg @@ -124,6 +124,7 @@ See the end of this file for a list of available jurisdictions and their codes. .ve, .dz, .gh, +.mg, .am, .bd, .cn, diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index dc70be53e..7e03c25c5 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -2919,6 +2919,12 @@ export function loadShields() { shields["GH:regional"] = roundedRectShield(Color.shields.yellow, Color.shields.black); + // Madagascar + shields["MG:RN-road"] = roundedRectShield( + Color.shields.red, + Color.shields.white + ); + // ASIA // Armenia From 0423a15aff970716f53102a02ed13be71a5ce225 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 2 Jun 2024 20:01:59 -0400 Subject: [PATCH 7/7] Add Niger national route shields --- doc-img/shield_map_world.svg | 1 + src/js/shield_defs.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc-img/shield_map_world.svg b/doc-img/shield_map_world.svg index ded937405..513c4f70c 100644 --- a/doc-img/shield_map_world.svg +++ b/doc-img/shield_map_world.svg @@ -124,6 +124,7 @@ See the end of this file for a list of available jurisdictions and their codes. .ve, .dz, .gh, +.ne, .am, .bd, .cn, diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index dc70be53e..49381c2fc 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -2919,6 +2919,12 @@ export function loadShields() { shields["GH:regional"] = roundedRectShield(Color.shields.yellow, Color.shields.black); + // Niger + shields["NE:N-roads"] = roundedRectShield( + Color.shields.red, + Color.shields.white + ); + // ASIA // Armenia