Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Costa Rica shields #458

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
1 change: 1 addition & 0 deletions 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.
4 changes: 4 additions & 0 deletions icons/shield40_badge_stroke_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions icons/shield40_badge_stroke_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ export function loadShields(shieldImages) {
},
};

let badgeWithStrokeShield = {
backgroundImage: [
shieldImages.shield40_badge_stroke_2,
shieldImages.shield40_badge_stroke_3,
],
textColor: Color.shields.black,
padding: {
left: 2,
right: 2,
top: 7,
bottom: 4,
},
};

let wideHexagonGreenShield = {
backgroundImage: shieldImages.shield40_hexagon_wide_green,
textColor: Color.shields.white,
Expand Down Expand Up @@ -551,6 +565,9 @@ export function loadShields(shieldImages) {
// Yukon
shields["CA:YT"] = roundedRectShield(Color.shields.white, Color.shields.red);

// Costa Rica
shields["CR:national"] = badgeWithStrokeShield;
Copy link
Member

@1ec5 1ec5 Jun 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

network=CR:national is being tagged on every route in the National Road Network, making no distinctions between primary, secondary, and tertiary routes, even though all three classes have different shields. This is similar to the situation in #455 (comment).

network=CR:national está aplicado en cada ruta de la Red Vial Nacional, sin distinción entre las rutas primarias, secundarias, y terciarias, aunque las tres clasificaciones tienen los señales diferentes. Es similar con la situación en #455 (comment).

Primaria Secundaria Terceraria

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like a showstopper, right? Don't we have a similar situation in a country in Europe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think so. We must be able to determine shield appearance from network=*, and three different route shields are all assigned network=CR:national. This would need to be fixed before we can support Costa Rican shields.

Copy link
Member

@1ec5 1ec5 Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// United States

// Interstate Highways
Expand Down