From a5008b05f6ee94a0dfad3a1cf8b19d1f15629e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 23 Feb 2022 01:39:17 -0800 Subject: [PATCH 1/3] Added PRC route shields --- .../shield40_cn_national_expressway_2.svg | 6 ++ .../shield40_cn_national_expressway_3.svg | 6 ++ .../shield40_cn_national_expressway_4.svg | 6 ++ .../shield40_cn_regional_expressway_2.svg | 6 ++ .../shield40_cn_regional_expressway_3.svg | 6 ++ .../shield40_cn_regional_expressway_4.svg | 6 ++ style/js/shield_defs.js | 79 +++++++++++++++++++ 7 files changed, 115 insertions(+) create mode 100644 style/icons/shield40_cn_national_expressway_2.svg create mode 100644 style/icons/shield40_cn_national_expressway_3.svg create mode 100644 style/icons/shield40_cn_national_expressway_4.svg create mode 100644 style/icons/shield40_cn_regional_expressway_2.svg create mode 100644 style/icons/shield40_cn_regional_expressway_3.svg create mode 100644 style/icons/shield40_cn_regional_expressway_4.svg diff --git a/style/icons/shield40_cn_national_expressway_2.svg b/style/icons/shield40_cn_national_expressway_2.svg new file mode 100644 index 000000000..ad23afd17 --- /dev/null +++ b/style/icons/shield40_cn_national_expressway_2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/style/icons/shield40_cn_national_expressway_3.svg b/style/icons/shield40_cn_national_expressway_3.svg new file mode 100644 index 000000000..a3aa4196c --- /dev/null +++ b/style/icons/shield40_cn_national_expressway_3.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/style/icons/shield40_cn_national_expressway_4.svg b/style/icons/shield40_cn_national_expressway_4.svg new file mode 100644 index 000000000..667e680cf --- /dev/null +++ b/style/icons/shield40_cn_national_expressway_4.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/style/icons/shield40_cn_regional_expressway_2.svg b/style/icons/shield40_cn_regional_expressway_2.svg new file mode 100644 index 000000000..ed21c6aeb --- /dev/null +++ b/style/icons/shield40_cn_regional_expressway_2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/style/icons/shield40_cn_regional_expressway_3.svg b/style/icons/shield40_cn_regional_expressway_3.svg new file mode 100644 index 000000000..3cd648e28 --- /dev/null +++ b/style/icons/shield40_cn_regional_expressway_3.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/style/icons/shield40_cn_regional_expressway_4.svg b/style/icons/shield40_cn_regional_expressway_4.svg new file mode 100644 index 000000000..996d40f19 --- /dev/null +++ b/style/icons/shield40_cn_regional_expressway_4.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/style/js/shield_defs.js b/style/js/shield_defs.js index 07e6242b7..30209c7de 100644 --- a/style/js/shield_defs.js +++ b/style/js/shield_defs.js @@ -610,6 +610,85 @@ export function loadShields(shieldImages) { shields["US:WA:Alternate"] = banneredShield(shields["US:WA"], ["ALT"]); // Asia + shields["CN:national"] = roundedRectShield( + "#bf2033", + "white", + "white", + 2, + 1, + null + ); + shields["CN:expressway"] = { + backgroundImage: [ + shieldImages.shield40_cn_national_expressway_2, + shieldImages.shield40_cn_national_expressway_3, + shieldImages.shield40_cn_national_expressway_4, + ], + textColor: "white", + padding: { + left: 2, + right: 2, + top: 6, + bottom: 2, + }, + }; + [ + "AH", + "BJ", + "CQ", + "FJ", + "GD", + "GS", + "GX", + "GZ", + "HA", + "HB", + "HE", + "HI", + "HL", + "HN", + "JL", + "JS", + "JX", + "LN", + "NM", + "NX", + "QH", + "SC", + "SD", + "SH", + "SN", + "SX", + "TJ", + "XJ", + "XZ", + "YN", + "ZJ", + ].forEach((province) => { + shields[`CN:${province}`] = roundedRectShield( + "#ffcd00", + "black", + "black", + 2, + 1, + null + ); + shields[`CN:${province}:expressway`] = { + backgroundImage: [ + shieldImages.shield40_cn_regional_expressway_2, + shieldImages.shield40_cn_regional_expressway_3, + shieldImages.shield40_cn_regional_expressway_4, + ], + textColor: "white", + padding: { + left: 2, + right: 2, + top: 6, + bottom: 2, + }, + }; + }); + shields["TW:freeway"] = { backgroundImage: shieldImages.shield40_tw_freeway, textLayoutConstraint: ShieldText.ellipseTextConstraint, From 3db23865f5573a59f78ee2c44b7328dedba1174e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 23 Feb 2022 01:39:42 -0800 Subject: [PATCH 2/3] Added Hong Kong route shields --- style/icons/shield40_hk.svg | 43 +++++++++++++++++++++++++++++++++++++ style/js/shield_defs.js | 12 +++++++++++ 2 files changed, 55 insertions(+) create mode 100644 style/icons/shield40_hk.svg diff --git a/style/icons/shield40_hk.svg b/style/icons/shield40_hk.svg new file mode 100644 index 000000000..0b66e5a0f --- /dev/null +++ b/style/icons/shield40_hk.svg @@ -0,0 +1,43 @@ + + + + + + + + diff --git a/style/js/shield_defs.js b/style/js/shield_defs.js index 30209c7de..ea845e0b1 100644 --- a/style/js/shield_defs.js +++ b/style/js/shield_defs.js @@ -689,6 +689,18 @@ export function loadShields(shieldImages) { }; }); + shields["HK"] = { + backgroundImage: shieldImages.shield40_hk, + textLayoutConstraint: ShieldText.southHalfellipseTextConstraint, + textColor: "black", + padding: { + left: 1, + right: 1, + top: 1, + bottom: 12, + }, + }; + shields["TW:freeway"] = { backgroundImage: shieldImages.shield40_tw_freeway, textLayoutConstraint: ShieldText.ellipseTextConstraint, From cc9c77a6ba1c3d9de8f73d76ce5181b6d9a36cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 24 Feb 2022 12:14:00 -0800 Subject: [PATCH 3/3] Optimized Hong Kong shield --- style/icons/shield40_hk.svg | 45 +++---------------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/style/icons/shield40_hk.svg b/style/icons/shield40_hk.svg index 0b66e5a0f..ea7e3a440 100644 --- a/style/icons/shield40_hk.svg +++ b/style/icons/shield40_hk.svg @@ -1,43 +1,4 @@ - - - - - - - + + +