From deaaf8740abcb04d8316de6d6a376d377f1321eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 10 Mar 2022 02:13:42 -0800 Subject: [PATCH] Added Japanese route shields --- doc-img/shield_map_world.svg | 1 + style/icons/shield40_jp_national_2.svg | 3 + style/icons/shield40_jp_national_3.svg | 3 + style/icons/shield40_jp_prefectural.svg | 3 + style/icons/shield40_jp_urban_expressway.svg | 3 + style/js/shield_defs.js | 94 ++++++++++++++++++++ 6 files changed, 107 insertions(+) create mode 100644 style/icons/shield40_jp_national_2.svg create mode 100644 style/icons/shield40_jp_national_3.svg create mode 100644 style/icons/shield40_jp_prefectural.svg create mode 100644 style/icons/shield40_jp_urban_expressway.svg diff --git a/doc-img/shield_map_world.svg b/doc-img/shield_map_world.svg index ccd088d18..712c21ab5 100644 --- a/doc-img/shield_map_world.svg +++ b/doc-img/shield_map_world.svg @@ -119,6 +119,7 @@ See the end of this file for a list of available jurisdictions and their codes. .bd, .cn, .hk, +.jp, .my, .np, .ph, diff --git a/style/icons/shield40_jp_national_2.svg b/style/icons/shield40_jp_national_2.svg new file mode 100644 index 000000000..acdc38709 --- /dev/null +++ b/style/icons/shield40_jp_national_2.svg @@ -0,0 +1,3 @@ + + + diff --git a/style/icons/shield40_jp_national_3.svg b/style/icons/shield40_jp_national_3.svg new file mode 100644 index 000000000..faf5ec0a7 --- /dev/null +++ b/style/icons/shield40_jp_national_3.svg @@ -0,0 +1,3 @@ + + + diff --git a/style/icons/shield40_jp_prefectural.svg b/style/icons/shield40_jp_prefectural.svg new file mode 100644 index 000000000..dd6820c59 --- /dev/null +++ b/style/icons/shield40_jp_prefectural.svg @@ -0,0 +1,3 @@ + + + diff --git a/style/icons/shield40_jp_urban_expressway.svg b/style/icons/shield40_jp_urban_expressway.svg new file mode 100644 index 000000000..33eee0e51 --- /dev/null +++ b/style/icons/shield40_jp_urban_expressway.svg @@ -0,0 +1,3 @@ + + + diff --git a/style/js/shield_defs.js b/style/js/shield_defs.js index 007eb4714..be52eaae7 100644 --- a/style/js/shield_defs.js +++ b/style/js/shield_defs.js @@ -918,6 +918,100 @@ export function loadShields(shieldImages) { }, }; + shields["JP:E"] = roundedRectShield("#006747", "white", "white", 2, 1); + [ + "首都高速道路", // Shuto + "名古屋高速道路", // Nagoya + ].forEach((network) => { + shields[network] = { + backgroundImage: shieldImages.shield40_jp_urban_expressway, + textLayoutConstraint: ShieldText.southHalfellipseTextConstraint, + textColor: "white", + padding: { + left: 3, + right: 3, + top: 2, + bottom: 6, + }, + }; + }); + shields["JP:national"] = { + backgroundImage: [ + shieldImages.shield40_jp_national_2, + shieldImages.shield40_jp_national_3, + ], + textLayoutConstraint: ShieldText.ellipseTextConstraint, + textColor: "white", + padding: { + left: 2, + right: 2, + top: 1, + bottom: 5, + }, + }; + shields["JP:prefectural"] = { + backgroundImage: shieldImages.shield40_jp_prefectural, + textLayoutConstraint: ShieldText.ellipseTextConstraint, + textColor: "white", + padding: { + left: 3, + right: 3, + top: 2, + bottom: 2, + }, + }; + [ + "aichi", + "akita", + "aomori", + "chiba", + "ehime", + "fukui", + "fukuoka", + "fukushima", + "gifu", + "gunma", + "hiroshima", + "hokkaido", + "hyogo", + "ibaraki", + "ishikawa", + "iwate", + "kagawa", + "kagoshima", + "kanagawa", + "kochi", + "kumamoto", + "kyoto", + "mie", + "miyagi", + "miyazaki", + "nagano", + "nagasaki", + "nara", + "niigata", + "oita", + "okayama", + "okinawa", + "osaka", + "saga", + "saitama", + "shiga", + "shimane", + "shizuoka", + "tochigi", + "tokushima", + "tokyo", + "tottori", + "toyama", + "wakayama", + "yamagata", + "yamaguchi", + "yamanashi", + ].forEach((prefecture) => { + shields[`JP:prefectural:${prefecture}`] = shields["JP:prefectural"]; + }); + shields["MY:E"] = shields["my:federal"] = { backgroundImage: shieldImages.shield40_my, textColor: "black",