Skip to content

Commit

Permalink
Merge branch 'main' into dark-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
claysmalley authored Dec 16, 2024
2 parents 9fa541c + 40ffdd4 commit 74e03bd
Show file tree
Hide file tree
Showing 12 changed files with 293 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Checkout Main Branch 🛎️
uses: actions/checkout@v4
with:
Expand All @@ -31,6 +27,10 @@ jobs:
uses: actions/checkout@v4
with:
path: pr-branch
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: pr-branch/package.json
- name: Install and Build Main Branch 🔧
run: |
npm ci --include=dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: package.json
- name: Install and Build 🔧
# TODO: when we move shieldlib to its own repo, move shieldlib docs CI also
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify the Node.js version
node-version-file: package.json

- name: Install dependencies
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-macos-13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: package.json
- name: Build Shield Library 🛡️
run: |
cd shieldlib
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: package.json
- name: Build Shield Library 🛡️
run: |
cd shieldlib
Expand Down
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.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
},
"engines": {
"npm": ">=8.3.0",
"node": ">=18"
"node": ">=18 <=20"
}
}
53 changes: 49 additions & 4 deletions scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@
"object_types": ["node"],
"description": "Marks the city with a national capital icon.",
"doc_url": "https://openmaptiles.org/schema/#capital",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/star_nation_capital.svg"
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/place_star_in_circle.svg"
},
{
"key": "capital",
"value": "2",
"object_types": ["node"],
"description": "Marks the city with a national capital icon.",
"doc_url": "https://openmaptiles.org/schema/#capital",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/star_nation_capital.svg"
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/place_star_in_circle.svg"
},
{
"key": "capital",
"value": "3",
"object_types": ["node"],
"description": "Marks the city with a state capital icon.",
"doc_url": "https://openmaptiles.org/schema/#capital",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/star_state_capital.svg"
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/place_star.svg"
},
{
"key": "capital",
"value": "4",
"object_types": ["node"],
"description": "Marks the city with a state capital icon.",
"doc_url": "https://openmaptiles.org/schema/#capital",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/star_state_capital.svg"
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/place_star.svg"
},
{
"key": "capital",
Expand Down Expand Up @@ -157,6 +157,27 @@
"doc_url": "https://openmaptiles.org/schema/#place",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/place_dot.svg"
},
{
"key": "place",
"value": "suburb",
"object_types": ["node"],
"description": "Suburbs are labeled in capital letters.",
"doc_url": "https://openmaptiles.org/schema/#place"
},
{
"key": "place",
"value": "quarter",
"object_types": ["node"],
"description": "Quarters are labeled in capital letters.",
"doc_url": "https://openmaptiles.org/schema/#place"
},
{
"key": "place",
"value": "neighbourhood",
"object_types": ["node"],
"description": "Neighborhoods are labeled in capital letters.",
"doc_url": "https://openmaptiles.org/schema/#place"
},
{
"key": "disputed",
"value": "yes",
Expand Down Expand Up @@ -565,6 +586,30 @@
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/poi_martini_glass.svg"
},
{
"key": "amenity",
"value": "restaurant",
"object_types": ["node", "area"],
"description": "Restaurants are marked by an icon representing a knife and fork.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/poi_restaurant.svg"
},
{
"key": "amenity",
"value": "fast_food",
"object_types": ["node", "area"],
"description": "Restaurants are marked by an icon representing a knife and fork.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/poi_restaurant.svg"
},
{
"key": "amenity",
"value": "food_court",
"object_types": ["node", "area"],
"description": "Restaurants are marked by an icon representing a knife and fork.",
"doc_url": "https://openmaptiles.org/schema/#poi",
"icon_url": "https://raw.githubusercontent.com/osm-americana/openstreetmap-americana/main/icons/poi_restaurant.svg"
},
{
"key": "amenity",
"value": "hospital",
Expand Down
2 changes: 2 additions & 0 deletions src/constants/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const airportOutline = "hsl(250, 41%, 79%)";
export const airportRunway = "hsl(250, 41%, 79%)";
export const airportLabel = "hsl(250, 71%, 29%)";

export const urbanSubAreaLabel = "hsl(211, 43%, 28%)";

//TODO - rename this variable to "palette"
export const palette = {
black: "black",
Expand Down
64 changes: 43 additions & 21 deletions src/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ export function loadShields() {
// United States

// Interstate Highways
shields["US:I"] = {
const usInterstateShield = {
spriteBlank: ["shield_us_interstate_2", "shield_us_interstate_3"],
textLayout: textConstraint("southHalfEllipse"),
textColor: Color.shields.white,
Expand All @@ -649,6 +649,9 @@ export function loadShields() {
top: 6,
bottom: 5,
},
};
shields["US:I"] = {
...usInterstateShield,
bannerMap: {
"US:I:Alternate": ["ALT"],
"US:I:Express": ["EXPR"],
Expand All @@ -660,7 +663,7 @@ export function loadShields() {
};

shields["US:I:Business:Loop"] = {
...shields["US:I"],
...usInterstateShield,
spriteBlank: [
"shield_us_interstate_business_2",
"shield_us_interstate_business_3",
Expand Down Expand Up @@ -1055,12 +1058,15 @@ export function loadShields() {
},
};
[
"Arapahoe",
"Archuleta",
"Chaffee",
"Clear_Creek",
"Conejos",
"Grand",
"Gunnison",
"Jackson",
"Jefferson",
"Lake",
"La_Plata",
"Larimer",
Expand Down Expand Up @@ -1457,7 +1463,7 @@ export function loadShields() {
};

// Maryland
shields["US:MD"] = {
const marylandShield = {
spriteBlank: ["shield_us_md_2", "shield_us_md_3"],
textColor: Color.shields.black,
padding: {
Expand All @@ -1466,14 +1472,18 @@ export function loadShields() {
top: 6,
bottom: 2,
},
};

shields["US:MD"] = {
...marylandShield,
bannerMap: {
"US:MD:Alternate": ["ALT"],
"US:MD:Bypass": ["BYP"],
},
};
shields["US:MD:Business"] = banneredShield(
{
...shields["US:MD"],
...marylandShield,
textColor: Color.shields.green,
colorLighten: Color.shields.green,
},
Expand Down Expand Up @@ -2097,7 +2107,7 @@ export function loadShields() {
);

// New York
shields["US:NY"] = {
const usNewYorkShield = {
spriteBlank: ["shield_us_ny_2", "shield_us_ny_3"],
textColor: Color.shields.black,
padding: {
Expand All @@ -2106,6 +2116,9 @@ export function loadShields() {
top: 5,
bottom: 5,
},
};
shields["US:NY"] = {
...usNewYorkShield,
bannerMap: {
"US:NY:Truck": ["TRK"],
},
Expand All @@ -2124,8 +2137,8 @@ export function loadShields() {
top: 3,
bottom: 3,
},
ref: "LOOP",
};
shields["US:NY:Inner_Loop"].ref = "LOOP";
shields["US:NY:Thruway"] = {
noref: {
spriteBlank: "shield_us_ny_thruway",
Expand All @@ -2137,7 +2150,7 @@ export function loadShields() {
},
};
shields["US:NY:Parkway"] = {
...shields["US:NY"],
...usNewYorkShield,
textColor: Color.shields.white,
colorLighten: Color.shields.white,
colorDarken: Color.shields.green,
Expand Down Expand Up @@ -2704,6 +2717,18 @@ export function loadShields() {
);

// Texas
const usTexasShapedShield = {
spriteBlank: "shield_us_tx_outline",
textColor: Color.shields.black,
textLayout: textConstraint("ellipse"),
padding: {
left: 3,
right: 0,
top: 7,
bottom: 10,
},
};

shields["US:TX"] = {
...roundedRectShield(Color.shields.white, Color.shields.black),
bannerMap: {
Expand All @@ -2717,22 +2742,14 @@ export function loadShields() {
},
};
shields["US:TX:FM"] = shields["US:TX:RM"] = {
spriteBlank: "shield_us_tx_outline",
textColor: Color.shields.black,
textLayout: textConstraint("ellipse"),
padding: {
left: 3,
right: 0,
top: 7,
bottom: 10,
},
...usTexasShapedShield,
bannerMap: {
"US:TX:FM:Business": ["BUS"],
},
};
shields["US:TX:Recreational"] = banneredShield(
{
...shields["US:TX:FM"],
...usTexasShapedShield,
textColor: Color.shields.brown,
colorLighten: Color.shields.brown,
},
Expand All @@ -2751,10 +2768,7 @@ export function loadShields() {
"US:TX:Loop:Express:Toll": ["EXPR", "LOOP"],
},
};
shields["US:TX:Toll"] = shields["US:TX:NTTA"] = roundedRectShield(
Color.shields.blue,
Color.shields.white
);

shields["US:TX:CTRMA"] = {
...roundedRectShield(
Color.shields.blue,
Expand Down Expand Up @@ -3142,6 +3156,14 @@ export function loadShields() {
},
};

// Bolivia
shields["BO:fundamental"] = {
...badgeShieldCrossbar,
colorDarken: Color.shields.green,
colorLighten: Color.shields.white,
textColor: Color.shields.white,
};

// Uruguay
shields["UY"] = homePlateDownShield(
5,
Expand Down
3 changes: 3 additions & 0 deletions src/layer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ export function build(locales) {
lyrPoi.poi,

lyrPlace.state,
lyrPlace.neighborhood,
lyrPlace.quarter,
lyrPlace.suburb,
lyrPlace.village,
lyrPlace.town,
lyrPlace.city,
Expand Down
Loading

0 comments on commit 74e03bd

Please sign in to comment.