Skip to content

Commit

Permalink
Merge branch 'main' into zlw-banner-map
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf authored Jun 3, 2024
2 parents e9bbe83 + 742e364 commit dded6d6
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
2 changes: 2 additions & 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.
28 changes: 28 additions & 0 deletions src/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,22 @@ export function loadShields() {
"US:NY:Truck": ["TRK"],
},
};
shields["US:NY:Inner_Loop"] = {
...trapezoidDownShield(
10,
Color.shields.white,
Color.shields.black,
Color.shields.black,
4
),
padding: {
left: 4,
right: 4,
top: 3,
bottom: 3,
},
};
shields["US:NY:Inner_Loop"].ref = "LOOP";
shields["US:NY:Thruway"] = {
noref: {
spriteBlank: "shield_us_ny_thruway",
Expand Down Expand Up @@ -2927,6 +2943,18 @@ export function loadShields() {
shields["GH:regional"] =
roundedRectShield(Color.shields.yellow, Color.shields.black);

// Madagascar
shields["MG:RN-road"] = roundedRectShield(
Color.shields.red,
Color.shields.white
);

// Niger
shields["NE:N-roads"] = roundedRectShield(
Color.shields.red,
Color.shields.white
);

// ASIA

// Armenia
Expand Down
55 changes: 55 additions & 0 deletions src/layer/boundary.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,57 @@ export const county = {
"source-layer": "boundary",
};

export const regionCasing = {
id: "boundary_region_casing",
type: "line",
paint: {
"line-color": Color.borderCasing,
"line-width": {
stops: [
[8, 5],
[9, 6],
],
},
},
filter: [
"all",
["==", ["get", "admin_level"], 5],
["==", ["get", "disputed"], 0],
["==", ["get", "maritime"], 0],
],
minzoom: 8,
layout: {
"line-join": "round",
visibility: "visible",
},
source: "openmaptiles",
"source-layer": "boundary",
};

export const region = {
id: "boundary_region",
type: "line",
paint: {
"line-color": Color.border,
"line-dasharray": [5, 4],
"line-width": 1,
"line-offset": 0,
},
filter: [
"all",
["==", ["get", "admin_level"], 5],
["==", ["get", "disputed"], 0],
["==", ["get", "maritime"], 0],
],
minzoom: 6,
layout: {
"line-join": "round",
visibility: "visible",
},
source: "openmaptiles",
"source-layer": "boundary",
};

export const stateCasing = {
id: "boundary_state_casing",
type: "line",
Expand Down Expand Up @@ -322,6 +373,10 @@ export const legendEntries = [
description: "County or county-equivalent",
layers: [county.id, countyCasing.id],
},
{
description: "Region",
layers: [region.id, regionCasing.id],
},
{
description: "City, town, or village",
layers: [city.id],
Expand Down
2 changes: 2 additions & 0 deletions src/layer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export function build(locales) {
lyrPark.parkFill,

lyrBoundary.countyCasing,
lyrBoundary.regionCasing,
lyrBoundary.stateCasing,
lyrBoundary.countryCasing,

Expand All @@ -52,6 +53,7 @@ export function build(locales) {

lyrBoundary.city,
lyrBoundary.county,
lyrBoundary.region,
lyrBoundary.state,
lyrBoundary.country,

Expand Down
4 changes: 4 additions & 0 deletions src/shieldtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ const iterShields = function* () {
network: "US:NH:Turnpike",
names: ["Blue Star Turnpike", "Everett Turnpike", "Spaulding Turnpike"],
};
yield {
network: "US:NY:Inner_Loop",
names: ["Inner Loop"],
};
};

const renderAllShields = async () => {
Expand Down

0 comments on commit dded6d6

Please sign in to comment.