Skip to content

Commit

Permalink
Merge branch 'main' into 1ec5-road-rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf authored Jun 6, 2024
2 parents 2d5e8ff + a7ec604 commit 0f4a56d
Show file tree
Hide file tree
Showing 37 changed files with 2,081 additions and 1,702 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Checkout Main Branch 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
path: main
- name: Checkout PR Branch 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: pr-branch
- name: Install and Build Main Branch 🔧
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
mv samples-diff ../dist/
working-directory: pr-branch
- name: Upload Build artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: americana
path: dist/
Expand All @@ -123,7 +123,7 @@ jobs:
echo $PR_SHA > pr/pr_sha
echo "Saved PR# ${{ github.event.pull_request.number }}, SHA# ${{ github.event.pull_request.head.sha }} for upload"
- name: Upload PR artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr_ci_artifacts
path: pr/
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install and Build 🔧
Expand All @@ -35,9 +35,9 @@ jobs:
mkdir -p dist/shield-docs
cp -r shieldlib/docs/* dist/shield-docs
- name: Upload 🏗
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy 🚀
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
25 changes: 16 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,27 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Prettify code
uses: creyD/[email protected] # https://github.com/creyD/prettier_action
- name: Set up Node.js
uses: actions/setup-node@v4
with:
dry: true
prettier_options: --write .
# Setting only_changed to false picks up new files
only_changed: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
node-version: "18" # Specify the Node.js version

- name: Install dependencies
run: npm install

- name: Run Prettier
id: prettier
run: npx prettier --check .
continue-on-error: false

- name: Check if Prettier failed
if: steps.prettier.outcome == 'failure'
run: exit 1
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 @@ -9,9 +9,9 @@ jobs:
runs-on: macos-13
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Build Shield Library 🛡️
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 @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Build Shield Library 🛡️
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ Additionally, **`refsByName`** is an object mapping way names to text that can b

When using `overrideByRef` or `refsByName`, make sure to add a line to the Special Cases section of this page explaining why it is necessary, as they are only intended for use in special cases.

In the case where all routes in a network should be drawn with the same shield text, set the text value in `ref`.

### Banners

The shield definition supports a property **`banners`** which accepts an array of text strings which will be drawn atop each shield, in 10px height increments. This is used in cases where additional text is needed to differentiate shields with a common symbology, for example for [special routes of the US Numbered Highway System](https://en.wikipedia.org/wiki/List_of_special_routes_of_the_United_States_Numbered_Highway_System):
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ The technology stack for this style can be summarized below:

The dynamic shield generator is included as a [module](shieldlib/README.md) in this repository and also [published to npm](https://www.npmjs.com/package/@americana/maplibre-shield-generator).

## Artifacts

- Style users can use the maplibre [StyleJSON](https://zelonewolf.github.io/openstreetmap-americana/style.json), and sprite sheets ([1x](https://zelonewolf.github.io/openstreetmap-americana/sprites/sprite.png), [2x](https://zelonewolf.github.io/openstreetmap-americana/sprites/[email protected])).
- For highway shield library users, a [ShieldJSON](https://zelonewolf.github.io/openstreetmap-americana/shields.json) must be supplied to associate route networks with sprite images and drawn shield shapes.
- The project [taginfo.json](https://zelonewolf.github.io/openstreetmap-americana/taginfo.json) lists which tags are used by the style.

## Data sources

The OpenStreetMap Americana style is built upon the [OpenMapTiles schema](https://openmaptiles.org/schema/), which includes:
Expand Down
3 changes: 3 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.
4 changes: 4 additions & 0 deletions icons/place_dot_in_circle.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_ca_on_hamilton_blue.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_ca_on_hamilton_green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions icons/shield_ca_on_toronto.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions icons/shield_us_al_foley.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions icons/shield_us_ut_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions icons/shield_us_ut_3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0f4a56d

Please sign in to comment.