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] 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,