Skip to content

Commit

Permalink
Merge branch 'main' into zlw-move-shield-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf authored Sep 19, 2023
2 parents bfc27cd + de40a62 commit 3094060
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
4 changes: 4 additions & 0 deletions icons/shield_badge_crossbar_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/shield_badge_crossbar_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 19 additions & 5 deletions src/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ export function loadShields() {
},
};

let badgeShieldCrossbar = {
spriteBlank: ["shield_badge_crossbar_2", "shield_badge_crossbar_3"],
textColor: Color.shields.black,
padding: {
left: 1,
right: 1,
top: 6,
bottom: 4,
},
};

// Default

shields["default"] = {
Expand Down Expand Up @@ -492,11 +503,14 @@ export function loadShields() {
"BUS",
]);

shields["US:US:Historic"] = {
...badgeShield,
textColor: Color.shields.brown,
colorLighten: Color.shields.brown,
};
shields["US:US:Historic"] = banneredShield(
{
...badgeShieldCrossbar,
textColor: Color.shields.brown,
colorLighten: Color.shields.brown,
},
["HIST"]
);

// Federal Agencies
shields["US:BIA"] = {
Expand Down
3 changes: 3 additions & 0 deletions src/layer/oneway.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const surface = {
["==", ["get", "oneway"], 1],
["!=", ["get", "ramp"], 1],
["!", ["in", ["get", "brunnel"], ["literal", ["bridge", "tunnel"]]]],
["!", ["in", ["get", "class"], ["literal", ["path", "track"]]]],
],
source: "openmaptiles",
"source-layer": "transportation",
Expand Down Expand Up @@ -73,6 +74,7 @@ export const tunnel = {
["==", ["get", "oneway"], 1],
["!=", ["get", "ramp"], 1],
["==", ["get", "brunnel"], "tunnel"],
["!", ["in", ["get", "class"], ["literal", ["path", "track"]]]],
],
paint: {
"icon-opacity": 0.2,
Expand All @@ -87,5 +89,6 @@ export const bridge = {
["==", ["get", "oneway"], 1],
["!=", ["get", "ramp"], 1],
["==", ["get", "brunnel"], "bridge"],
["!", ["in", ["get", "class"], ["literal", ["path", "track"]]]],
],
};

0 comments on commit 3094060

Please sign in to comment.