Skip to content

Commit

Permalink
Added Japanese route shields
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Mar 15, 2022
1 parent e4b899b commit 78cb222
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc-img/shield_map_world.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions style/icons/shield40_jp_national_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions style/icons/shield40_jp_national_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions style/icons/shield40_jp_prefectural.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions style/icons/shield40_jp_urban_expressway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions style/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,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",
Expand Down

0 comments on commit 78cb222

Please sign in to comment.