From a421a2bb3a1e8ec0f796c75603d4ef55c81e0654 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Thu, 19 May 2022 21:34:23 -0400 Subject: [PATCH 01/27] Add Zia symbol for New Mexico shield --- style/icons/shield40_us_nm_2.svg | 5 +++++ style/icons/shield40_us_nm_3.svg | 5 +++++ style/js/shield_defs.js | 14 +++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 style/icons/shield40_us_nm_2.svg create mode 100644 style/icons/shield40_us_nm_3.svg diff --git a/style/icons/shield40_us_nm_2.svg b/style/icons/shield40_us_nm_2.svg new file mode 100644 index 000000000..13a23c708 --- /dev/null +++ b/style/icons/shield40_us_nm_2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/style/icons/shield40_us_nm_3.svg b/style/icons/shield40_us_nm_3.svg new file mode 100644 index 000000000..a15b60d6a --- /dev/null +++ b/style/icons/shield40_us_nm_3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/style/js/shield_defs.js b/style/js/shield_defs.js index 50747e018..7a67ea303 100644 --- a/style/js/shield_defs.js +++ b/style/js/shield_defs.js @@ -1112,7 +1112,19 @@ export function loadShields(shieldImages) { ].forEach((county) => (shields[`US:NJ:${county}`] = usMUTCDCountyShield)); shields["US:NJ:Bergen"] = shields["default"]; - shields["US:NM"] = pillShield(colors.white, colors.pink, colors.black); + shields["US:NM"] = { + backgroundImage: [ + shieldImages.shield40_us_nm_2, + shieldImages.shield40_us_nm_3, + ], + textColor: colors.black, + padding: { + left: 7, + right: 7, + top: 7, + bottom: 7, + }, + }; shields["US:NV"] = { backgroundImage: shieldImages.shield40_us_nv, From c389b373d44f18b898d0e9c334f6698f7ea3a2ae Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Fri, 15 Dec 2023 00:35:52 -0500 Subject: [PATCH 02/27] Add sprite sheet stats --- scripts/stats.js | 36 ++++++++++++++++++++++++++++++++++++ scripts/stats_compare.js | 16 +++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/scripts/stats.js b/scripts/stats.js index b75ef7f01..f5da4f778 100644 --- a/scripts/stats.js +++ b/scripts/stats.js @@ -1,6 +1,7 @@ import * as Style from "../src/js/style.js"; import config from "../src/config.js"; import { Command, Option } from "commander"; +import fs from "node:fs"; const program = new Command(); program @@ -18,6 +19,18 @@ program .addOption( new Option("-s, --layer-size", "size of all layers").conflicts("allJson") ) + .addOption( + new Option( + "-ss1, --spritesheet-1x-size", + "size of 1x sprite sheet" + ).conflicts("allJson") + ) + .addOption( + new Option( + "-ss2, --spritesheet-2x-size", + "size of 2x sprite sheet" + ).conflicts("allJson") + ) .option("-loc, --locales ", "language codes", ["mul"]) .option("-j, --all-json", "output all stats in JSON") .option("-pp, --pretty", "pretty-print JSON output"); @@ -45,6 +58,27 @@ if (opts.layerCount) { process.exit(); } +function spriteSheetSize(single) { + let size = single ? "" : "@2x"; + return ( + fs.statSync(`dist/sprites/sprite${size}.png`).size + + fs.statSync(`dist/sprites/sprite${size}.json`).size + ); +} + +const spriteSheet1xSize = spriteSheetSize(true); +const spriteSheet2xSize = spriteSheetSize(false); + +if (opts.spritesheet1xSize) { + console.log(spriteSheet1xSize); + process.exit(); +} + +if (opts.spritesheet2xSize) { + console.log(spriteSheet2xSize); + process.exit(); +} + const styleSize = JSON.stringify(layers).length; if (opts.layerSize) { @@ -58,6 +92,8 @@ const stats = { layerCount, styleSize, layerGroup: {}, + spriteSheet1xSize, + spriteSheet2xSize, }; for (let i = 0; i < layerCount; i++) { diff --git a/scripts/stats_compare.js b/scripts/stats_compare.js index 45f70dad7..7f71e23ba 100644 --- a/scripts/stats_compare.js +++ b/scripts/stats_compare.js @@ -22,12 +22,26 @@ const layersRow = mdCompareRow( ); const sizeRow = mdCompareRow( - "Size (b)", + "StyleJSON Size (b)", stats1.styleSize, stats2.styleSize, difference.styleSize ); +const ss1xRow = mdCompareRow( + "1x Sprite Sheet Size (b)", + stats1.spriteSheet1xSize, + stats2.spriteSheet1xSize, + difference.spriteSheet1xSize +); + +const ss2xRow = mdCompareRow( + "2x Sprite Sheet Size (b)", + stats1.spriteSheet2xSize, + stats2.spriteSheet2xSize, + difference.spriteSheet2xSize +); + printTable("Style size statistics", [layersRow, sizeRow]); /** From a3c69816f257eb7944ccf40b272ddecfb74a0aa6 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Fri, 15 Dec 2023 23:24:35 -0500 Subject: [PATCH 03/27] Side-by-side map preview --- .github/workflows/build-preview.yml | 65 ++++++++++++++++++++++++----- CONTRIBUTING.md | 4 ++ scripts/folder_diff.sh | 60 ++++++++++++++++++++++++++ src/js/shield_defs.js | 2 +- test/sample_locations.json | 16 +++++-- 5 files changed, 132 insertions(+), 15 deletions(-) create mode 100755 scripts/folder_diff.sh diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 16c259678..d4f384125 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -26,6 +26,11 @@ jobs: uses: actions/checkout@v3 with: ref: main + path: main + - name: Checkout PR Branch 🛎️ + uses: actions/checkout@v3 + with: + path: pr-branch - name: Install and Build Main Branch 🔧 run: | npm ci --include=dev @@ -33,16 +38,18 @@ jobs: npm run style npm run shields cp src/configs/config.aws.js src/config.js + working-directory: main - name: Capture main branch usage statistics id: main-stats run: | - MAIN_STATS=$(node scripts/stats.js -j) + MAIN_STATS=$(node ../pr-branch/scripts/stats.js -j) echo "MAIN_STATS<> $GITHUB_ENV echo -e "$MAIN_STATS" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV + working-directory: main - name: Checkout PR Branch 🛎️ uses: actions/checkout@v3 - - name: Install and Build 🔧 + - name: Install and Build PR Branch 🔧 # TODO: when we move shieldlib to its own repo, move shieldlib docs CI also run: | npm ci --include=dev @@ -52,11 +59,34 @@ jobs: cp src/configs/config.aws.js src/config.js mkdir -p dist/shield-docs cp -r shieldlib/docs/* dist/shield-docs - - name: Upload Build artifact - uses: actions/upload-artifact@v3 - with: - name: americana - path: dist/ + mv dist .. + working-directory: pr-branch + - name: Start main branch map server + id: main-start-server + run: | + npm start & + until nc -z localhost 1776; do sleep 1; done + working-directory: main + - name: Capture main branch sample clips + # Run PR branch scripts against server running from main branch + id: main-samples + run: | + npm run generate_samples + mv samples ../samples-main + working-directory: pr-branch + - name: Stop main branch map server + id: main-stop-server + run: kill $(lsof -t -i:1776) 2>/dev/null || echo "No process found listening on port 1776." + working-directory: main + - name: Capture PR branch sample clips + id: pr-samples + run: | + npm start & + until nc -z localhost 1776; do sleep 1; done + npm run generate_samples + kill $(lsof -t -i:1776) 2>/dev/null || echo "No process found listening on port 1776." + mv samples ../samples-pr + working-directory: pr-branch - name: Capture PR branch usage statistics id: pr-stats run: | @@ -64,14 +94,29 @@ jobs: echo "PR_STATS<> $GITHUB_ENV echo -e "$PR_STATS" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV + working-directory: pr-branch - name: Compare Stats id: compare-stats run: | - mkdir -p pr + mkdir -p ../pr echo '${{ env.MAIN_STATS }}' echo '${{ env.PR_STATS }}' - npm exec tsx scripts/stats_compare '${{ env.MAIN_STATS }}' '${{ env.PR_STATS }}' > pr/stats-difference.md - - name: Save PR artifacts + npm exec tsx scripts/stats_compare '${{ env.MAIN_STATS }}' '${{ env.PR_STATS }}' > ../pr/stats-difference.md + working-directory: pr-branch + - name: Generate map diff sample clips + id: map-diff-samples + run: | + ./scripts/folder_diff.sh ../samples-main ../samples-pr https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/ ${{ github.event.pull_request.head.sha }} + mv pr_preview-extra.md ../pr/ + cat ../pr/pr_preview-extra.md + mv samples-diff ../dist/ + working-directory: pr-branch + - name: Upload Build artifacts + uses: actions/upload-artifact@v3 + with: + name: americana + path: dist/ + - name: Save PR attributes env: PR_NUMBER: ${{ github.event.pull_request.number }} PR_SHA: ${{ github.event.pull_request.head.sha }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5415fba27..216ac2039 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -405,3 +405,7 @@ For consistency, POI icons use the following color palette: ## Fonts Fonts for style labels are packaged and defined in [fontstack66](https://github.com/osm-americana/fontstack66), Americana's font package. + +## Render Samples + +A GitHub action will check a list of regression test locations to see if the map has changed. If any of those locations have changed visually, the "Map Preview" check will generate before and after images. If your PR changes the visual appearance of the map, add an entry to `test/sample_locations.json` with a location that best illustrates the change. This will help show your change to PR reviewers as well as act as a regression test for future PRs. diff --git a/scripts/folder_diff.sh b/scripts/folder_diff.sh new file mode 100755 index 000000000..0c306c61a --- /dev/null +++ b/scripts/folder_diff.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# Compare two folders of images and produce an .md file of differences + +# Check if the right number of arguments are passed +if [ "$#" -ne 4 ]; then + echo "Usage: $0 " + exit 1 +fi + +FOLDER1="$1" +FOLDER2="$2" +OUTPUT_FOLDER="samples-diff" +URL_BASE="$3" + +# Ensure that image URLs are unique to this commit because GitHub caches identical URLs +SHA="$4" + +# Create the output folder if it doesn't exist +mkdir -p "$OUTPUT_FOLDER" + +# Loop through files in FOLDER1 +for file in "$FOLDER1"/*.png; do + # Extract just the base filename without the path + basefile=$(basename "$file") + + # Check if file exists in FOLDER2 + if [ -e "$FOLDER2/$basefile" ]; then + # Compare the files + cmp -s "$FOLDER1/$basefile" "$FOLDER2/$basefile" + + # If files are different ($? is the exit status of last command, 1 means different for cmp) + if [ $? -eq 1 ]; then + # Copy the files to the output folder with the appropriate naming scheme + cp "$FOLDER1/$basefile" "$OUTPUT_FOLDER/${basefile%.*}_${SHA}_before.png" + cp "$FOLDER2/$basefile" "$OUTPUT_FOLDER/${basefile%.*}_${SHA}_after.png" + fi + fi +done + +OUTPUT_MD="pr_preview-extra.md" + +# Start the table with headers +echo "## Map Changes" > $OUTPUT_MD +echo "| Sample Name | Before | After |" >> $OUTPUT_MD +echo "|-------------|--------|-------|" >> $OUTPUT_MD + +# Loop through *_before.png files in the output folder +for before_file in "$OUTPUT_FOLDER"/*_before.png; do + # Extract just the base filename without the path and the '_before' suffix + basefile=$(basename "$before_file" _${SHA}_before.png) + + # Construct the path to the corresponding after file + after_file="$OUTPUT_FOLDER/${basefile}_${SHA}_after.png" + + # Check if the after file exists + if [ -e "$after_file" ]; then + # Add an entry to the markdown table + echo "| $basefile | ![before]($URL_BASE$before_file) | ![after]($URL_BASE$after_file) |" >> $OUTPUT_MD + fi +done diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 5f60877a8..fa4fd7f13 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -500,7 +500,7 @@ export function loadShields() { textColor: Color.shields.brown, colorLighten: Color.shields.brown, }, - ["HIST"], + ["XYZA"], Color.shields.brown ); diff --git a/test/sample_locations.json b/test/sample_locations.json index 689a07e94..8b4efff47 100644 --- a/test/sample_locations.json +++ b/test/sample_locations.json @@ -12,16 +12,24 @@ "location": "13/40.01264/-75.70446", "name": "downingtown_alt_trk_bus", "viewport": { - "width": 600, - "height": 600 + "width": 400, + "height": 400 } }, { "location": "13/35.22439/-99.99495", "name": "historic_us66_oklahoma", "viewport": { - "width": 600, - "height": 600 + "width": 400, + "height": 400 + } + }, + { + "location": "15/33.92208/-83.37654", + "name": "athens_ga_7_way_concurrency", + "viewport": { + "width": 400, + "height": 400 } } ] From 816cbb199a7ffc8e4fa909dc5ea66999a6f67a3d Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 21:03:16 -0500 Subject: [PATCH 04/27] Convert folder_diff to typescript --- .github/workflows/build-preview.yml | 2 +- scripts/folder_diff.sh | 60 ---------------------------- scripts/folder_diff.ts | 61 +++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 61 deletions(-) delete mode 100755 scripts/folder_diff.sh create mode 100644 scripts/folder_diff.ts diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index d4f384125..7aa51e631 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -106,7 +106,7 @@ jobs: - name: Generate map diff sample clips id: map-diff-samples run: | - ./scripts/folder_diff.sh ../samples-main ../samples-pr https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/ ${{ github.event.pull_request.head.sha }} + npm exec tsx scripts/folder_diff ../samples-main ../samples-pr https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/ ${{ github.event.pull_request.head.sha }} mv pr_preview-extra.md ../pr/ cat ../pr/pr_preview-extra.md mv samples-diff ../dist/ diff --git a/scripts/folder_diff.sh b/scripts/folder_diff.sh deleted file mode 100755 index 0c306c61a..000000000 --- a/scripts/folder_diff.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# Compare two folders of images and produce an .md file of differences - -# Check if the right number of arguments are passed -if [ "$#" -ne 4 ]; then - echo "Usage: $0 " - exit 1 -fi - -FOLDER1="$1" -FOLDER2="$2" -OUTPUT_FOLDER="samples-diff" -URL_BASE="$3" - -# Ensure that image URLs are unique to this commit because GitHub caches identical URLs -SHA="$4" - -# Create the output folder if it doesn't exist -mkdir -p "$OUTPUT_FOLDER" - -# Loop through files in FOLDER1 -for file in "$FOLDER1"/*.png; do - # Extract just the base filename without the path - basefile=$(basename "$file") - - # Check if file exists in FOLDER2 - if [ -e "$FOLDER2/$basefile" ]; then - # Compare the files - cmp -s "$FOLDER1/$basefile" "$FOLDER2/$basefile" - - # If files are different ($? is the exit status of last command, 1 means different for cmp) - if [ $? -eq 1 ]; then - # Copy the files to the output folder with the appropriate naming scheme - cp "$FOLDER1/$basefile" "$OUTPUT_FOLDER/${basefile%.*}_${SHA}_before.png" - cp "$FOLDER2/$basefile" "$OUTPUT_FOLDER/${basefile%.*}_${SHA}_after.png" - fi - fi -done - -OUTPUT_MD="pr_preview-extra.md" - -# Start the table with headers -echo "## Map Changes" > $OUTPUT_MD -echo "| Sample Name | Before | After |" >> $OUTPUT_MD -echo "|-------------|--------|-------|" >> $OUTPUT_MD - -# Loop through *_before.png files in the output folder -for before_file in "$OUTPUT_FOLDER"/*_before.png; do - # Extract just the base filename without the path and the '_before' suffix - basefile=$(basename "$before_file" _${SHA}_before.png) - - # Construct the path to the corresponding after file - after_file="$OUTPUT_FOLDER/${basefile}_${SHA}_after.png" - - # Check if the after file exists - if [ -e "$after_file" ]; then - # Add an entry to the markdown table - echo "| $basefile | ![before]($URL_BASE$before_file) | ![after]($URL_BASE$after_file) |" >> $OUTPUT_MD - fi -done diff --git a/scripts/folder_diff.ts b/scripts/folder_diff.ts new file mode 100644 index 000000000..5f27b2d99 --- /dev/null +++ b/scripts/folder_diff.ts @@ -0,0 +1,61 @@ +import fs from "fs"; +import { basename } from "path"; +import { execSync } from "child_process"; + +// Check if the right number of arguments are passed +if (process.argv.length !== 6) { + console.log("Usage: "); + process.exit(1); +} + +const [folder1, folder2, urlBase, sha] = process.argv.slice(2); +const outputFolder = "samples-diff"; + +// Create the output folder if it doesn't exist +if (!fs.existsSync(outputFolder)) { + fs.mkdirSync(outputFolder); +} + +// Loop through files in folder1 +fs.readdirSync(folder1) + .filter((file) => file.endsWith(".png")) + .forEach((file) => { + const basefile = basename(file); + + // Check if file exists in folder2 + if (fs.existsSync(`${folder2}/${basefile}`)) { + // Compare the files + try { + execSync(`cmp -s "${folder1}/${basefile}" "${folder2}/${basefile}"`); + } catch (e) { + // If files are different + fs.copyFileSync( + `${folder1}/${basefile}`, + `${outputFolder}/${basefile.split(".")[0]}_${sha}_before.png` + ); + fs.copyFileSync( + `${folder2}/${basefile}`, + `${outputFolder}/${basefile.split(".")[0]}_${sha}_after.png` + ); + } + } + }); + +const outputMD = "pr_preview-extra.md"; +let mdContent = + "## Map Changes\n| Sample Name | Before | After |\n|-------------|--------|-------|\n"; + +// Loop through *_before.png files in the output folder +fs.readdirSync(outputFolder) + .filter((file) => file.endsWith("_before.png")) + .forEach((before_file) => { + const basefile = basename(before_file, `_${sha}_before.png`); + + // Check if the after file exists + if (fs.existsSync(`${outputFolder}/${basefile}_${sha}_after.png`)) { + // Add an entry to the markdown table + mdContent += `| ${basefile} | ![before](${urlBase}${before_file}) | ![after](${urlBase}${outputFolder}/${basefile}_${sha}_after.png) |\n`; + } + }); + +fs.writeFileSync(outputMD, mdContent); From 8cb8975b38e7a999d42bebe7aca04ec784921d0e Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 21:15:08 -0500 Subject: [PATCH 05/27] debugging --- .github/workflows/build-preview.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 7aa51e631..71357b370 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -107,6 +107,7 @@ jobs: id: map-diff-samples run: | npm exec tsx scripts/folder_diff ../samples-main ../samples-pr https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/ ${{ github.event.pull_request.head.sha }} + cat pr_preview-extra.md mv pr_preview-extra.md ../pr/ cat ../pr/pr_preview-extra.md mv samples-diff ../dist/ From a980401202a194697e3fa362559c8217eec5aa69 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 21:27:14 -0500 Subject: [PATCH 06/27] Fix bug in before image url --- .github/workflows/build-preview.yml | 1 - scripts/folder_diff.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 71357b370..7aa51e631 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -107,7 +107,6 @@ jobs: id: map-diff-samples run: | npm exec tsx scripts/folder_diff ../samples-main ../samples-pr https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/ ${{ github.event.pull_request.head.sha }} - cat pr_preview-extra.md mv pr_preview-extra.md ../pr/ cat ../pr/pr_preview-extra.md mv samples-diff ../dist/ diff --git a/scripts/folder_diff.ts b/scripts/folder_diff.ts index 5f27b2d99..a77ddf718 100644 --- a/scripts/folder_diff.ts +++ b/scripts/folder_diff.ts @@ -54,7 +54,7 @@ fs.readdirSync(outputFolder) // Check if the after file exists if (fs.existsSync(`${outputFolder}/${basefile}_${sha}_after.png`)) { // Add an entry to the markdown table - mdContent += `| ${basefile} | ![before](${urlBase}${before_file}) | ![after](${urlBase}${outputFolder}/${basefile}_${sha}_after.png) |\n`; + mdContent += `| ${basefile} | ![before](${urlBase}${outputFolder}/${basefile}_${sha}_before.png) | ![after](${urlBase}${outputFolder}/${basefile}_${sha}_after.png) |\n`; } }); From 4831befcc28872615ef8ee8a2d090a408f815a49 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 22:51:40 -0500 Subject: [PATCH 07/27] Add links to before/after --- scripts/folder_diff.ts | 34 ++++++++++++++++++++++++++++++++-- tsconfig.json | 1 + 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/scripts/folder_diff.ts b/scripts/folder_diff.ts index a77ddf718..00967bf57 100644 --- a/scripts/folder_diff.ts +++ b/scripts/folder_diff.ts @@ -2,6 +2,31 @@ import fs from "fs"; import { basename } from "path"; import { execSync } from "child_process"; +interface Viewport { + width: number; + height: number; +} + +interface LocationData { + location: string; + name: string; + viewport: Viewport; + controls?: boolean; +} + +type Locations = LocationData[]; + +import sampleLocationJSON from "../test/sample_locations.json"; + +const sampleLocations: Locations = sampleLocationJSON as Locations; + +function getLocationByName(name: string): string | undefined { + const locationData = sampleLocations.find( + (location) => location.name === name + ); + return locationData?.location; +} + // Check if the right number of arguments are passed if (process.argv.length !== 6) { console.log("Usage: "); @@ -43,7 +68,7 @@ fs.readdirSync(folder1) const outputMD = "pr_preview-extra.md"; let mdContent = - "## Map Changes\n| Sample Name | Before | After |\n|-------------|--------|-------|\n"; + "## Map Changes\n| Sample Name | Current Render | This PR |\n|-------------|--------|-------|\n"; // Loop through *_before.png files in the output folder fs.readdirSync(outputFolder) @@ -54,7 +79,12 @@ fs.readdirSync(outputFolder) // Check if the after file exists if (fs.existsSync(`${outputFolder}/${basefile}_${sha}_after.png`)) { // Add an entry to the markdown table - mdContent += `| ${basefile} | ![before](${urlBase}${outputFolder}/${basefile}_${sha}_before.png) | ![after](${urlBase}${outputFolder}/${basefile}_${sha}_after.png) |\n`; + const loc = getLocationByName("basefile"); + mdContent += + `| ${basefile}
${loc}
[Current Render](https://zelonewolf.github.io/openstreetmap-americana/#map=${loc})` + + `
[This PR](${urlBase}#map=${loc}) ` + + `| ![Current Render](${urlBase}${outputFolder}/${basefile}_${sha}_before.png) |` + + ` ![This PR](${urlBase}${outputFolder}/${basefile}_${sha}_after.png) |\n`; } }); diff --git a/tsconfig.json b/tsconfig.json index c4d433a91..d457a561d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "ESNext", "module": "ESNext", "moduleResolution": "node", + "resolveJsonModule": true, "allowSyntheticDefaultImports": true }, "include": ["src/**/*.ts", "shieldlib/src/headless_graphics.ts"] From 5083a1eec5c8cfabca54a91b0bf212e5fc194d77 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 22:59:27 -0500 Subject: [PATCH 08/27] Debugging --- scripts/folder_diff.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/folder_diff.ts b/scripts/folder_diff.ts index 00967bf57..7401a9900 100644 --- a/scripts/folder_diff.ts +++ b/scripts/folder_diff.ts @@ -20,6 +20,9 @@ import sampleLocationJSON from "../test/sample_locations.json"; const sampleLocations: Locations = sampleLocationJSON as Locations; +//debugging +console.log(sampleLocations); + function getLocationByName(name: string): string | undefined { const locationData = sampleLocations.find( (location) => location.name === name From 0c851ec4670ddb31ac5b1407773c99d5b32c7c3b Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 23:10:58 -0500 Subject: [PATCH 09/27] bugfix --- scripts/folder_diff.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/folder_diff.ts b/scripts/folder_diff.ts index 7401a9900..0f49fe9c9 100644 --- a/scripts/folder_diff.ts +++ b/scripts/folder_diff.ts @@ -20,9 +20,6 @@ import sampleLocationJSON from "../test/sample_locations.json"; const sampleLocations: Locations = sampleLocationJSON as Locations; -//debugging -console.log(sampleLocations); - function getLocationByName(name: string): string | undefined { const locationData = sampleLocations.find( (location) => location.name === name @@ -82,7 +79,7 @@ fs.readdirSync(outputFolder) // Check if the after file exists if (fs.existsSync(`${outputFolder}/${basefile}_${sha}_after.png`)) { // Add an entry to the markdown table - const loc = getLocationByName("basefile"); + const loc = getLocationByName(basefile); mdContent += `| ${basefile}
${loc}
[Current Render](https://zelonewolf.github.io/openstreetmap-americana/#map=${loc})` + `
[This PR](${urlBase}#map=${loc}) ` + From b1f924ace40c496e62613be242178a765b0c54e2 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 23:15:30 -0500 Subject: [PATCH 10/27] Text tweak --- scripts/folder_diff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/folder_diff.ts b/scripts/folder_diff.ts index 0f49fe9c9..93263faf8 100644 --- a/scripts/folder_diff.ts +++ b/scripts/folder_diff.ts @@ -68,7 +68,7 @@ fs.readdirSync(folder1) const outputMD = "pr_preview-extra.md"; let mdContent = - "## Map Changes\n| Sample Name | Current Render | This PR |\n|-------------|--------|-------|\n"; + "## Map Changes\n| Sample | Current Render | This PR |\n|-------------|--------|-------|\n"; // Loop through *_before.png files in the output folder fs.readdirSync(outputFolder) From 30f93e68d69eba3de0c3c812768b492c261d1130 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Dec 2023 23:19:33 -0500 Subject: [PATCH 11/27] Add Manhattan location for POIs --- test/sample_locations.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/sample_locations.json b/test/sample_locations.json index 8b4efff47..7c4f4a291 100644 --- a/test/sample_locations.json +++ b/test/sample_locations.json @@ -31,5 +31,13 @@ "width": 400, "height": 400 } + }, + { + "location": "16/40.765073/-73.965035", + "name": "manhattan_poi", + "viewport": { + "width": 400, + "height": 400 + } } ] From a6803d71443d93d5e1e9b6451797f68f60ecbd86 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 08:55:34 -0500 Subject: [PATCH 12/27] Pass dist folder as param to stats --- .github/workflows/build-preview.yml | 4 ++-- scripts/stats.js | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 7aa51e631..c446c98b9 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -42,11 +42,11 @@ jobs: - name: Capture main branch usage statistics id: main-stats run: | - MAIN_STATS=$(node ../pr-branch/scripts/stats.js -j) + MAIN_STATS=$(node scripts/stats.js -d ../main/dist -j) echo "MAIN_STATS<> $GITHUB_ENV echo -e "$MAIN_STATS" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV - working-directory: main + working-directory: pr-branch - name: Checkout PR Branch 🛎️ uses: actions/checkout@v3 - name: Install and Build PR Branch 🔧 diff --git a/scripts/stats.js b/scripts/stats.js index f5da4f778..05ec52d85 100644 --- a/scripts/stats.js +++ b/scripts/stats.js @@ -33,7 +33,12 @@ program ) .option("-loc, --locales ", "language codes", ["mul"]) .option("-j, --all-json", "output all stats in JSON") - .option("-pp, --pretty", "pretty-print JSON output"); + .option("-pp, --pretty", "pretty-print JSON output") + .option( + "-d, --directory ", + "specify location of Americana distribution", + ["dist"] + ); program.parse(process.argv); @@ -42,6 +47,7 @@ const opts = program.opts(); if (Object.keys(opts).length === 1) program.help(); const locales = opts.locales[0].split(","); +const distDir = opts.directory; const style = Style.build( config.OPENMAPTILES_URL, @@ -58,16 +64,16 @@ if (opts.layerCount) { process.exit(); } -function spriteSheetSize(single) { +function spriteSheetSize(distDir, single) { let size = single ? "" : "@2x"; return ( - fs.statSync(`dist/sprites/sprite${size}.png`).size + - fs.statSync(`dist/sprites/sprite${size}.json`).size + fs.statSync(`${distDir}/sprites/sprite${size}.png`).size + + fs.statSync(`${distDir}/sprites/sprite${size}.json`).size ); } -const spriteSheet1xSize = spriteSheetSize(true); -const spriteSheet2xSize = spriteSheetSize(false); +const spriteSheet1xSize = spriteSheetSize(distDir, true); +const spriteSheet2xSize = spriteSheetSize(distDir, false); if (opts.spritesheet1xSize) { console.log(spriteSheet1xSize); From abfd29f16397ae940ed0b7933af3ed58d55a9377 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 08:59:14 -0500 Subject: [PATCH 13/27] Build PR branch before running stats --- .github/workflows/build-preview.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index c446c98b9..768c91d06 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -39,14 +39,6 @@ jobs: npm run shields cp src/configs/config.aws.js src/config.js working-directory: main - - name: Capture main branch usage statistics - id: main-stats - run: | - MAIN_STATS=$(node scripts/stats.js -d ../main/dist -j) - echo "MAIN_STATS<> $GITHUB_ENV - echo -e "$MAIN_STATS" >> $GITHUB_ENV - echo "EOF" >> $GITHUB_ENV - working-directory: pr-branch - name: Checkout PR Branch 🛎️ uses: actions/checkout@v3 - name: Install and Build PR Branch 🔧 @@ -61,6 +53,14 @@ jobs: cp -r shieldlib/docs/* dist/shield-docs mv dist .. working-directory: pr-branch + - name: Capture main branch usage statistics + id: main-stats + run: | + MAIN_STATS=$(node scripts/stats.js -d ../main/dist -j) + echo "MAIN_STATS<> $GITHUB_ENV + echo -e "$MAIN_STATS" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + working-directory: pr-branch - name: Start main branch map server id: main-start-server run: | From 614040d42d7f78dd394cc626cad4eee9a859f89e Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 09:41:09 -0500 Subject: [PATCH 14/27] remove dist dump --- .github/workflows/build-preview.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 768c91d06..3a5032da3 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -51,7 +51,6 @@ jobs: cp src/configs/config.aws.js src/config.js mkdir -p dist/shield-docs cp -r shieldlib/docs/* dist/shield-docs - mv dist .. working-directory: pr-branch - name: Capture main branch usage statistics id: main-stats From 899f31f43e64df597ae0d776c7b8767e58639067 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 09:43:41 -0500 Subject: [PATCH 15/27] Remove extra checkout --- .github/workflows/build-preview.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 3a5032da3..69ddb711a 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -39,8 +39,6 @@ jobs: npm run shields cp src/configs/config.aws.js src/config.js working-directory: main - - name: Checkout PR Branch 🛎️ - uses: actions/checkout@v3 - name: Install and Build PR Branch 🔧 # TODO: when we move shieldlib to its own repo, move shieldlib docs CI also run: | From 3e15696eb6a2b08ab83378260f953a5b1a8aa2a1 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 10:15:22 -0500 Subject: [PATCH 16/27] Fix path issues --- .github/workflows/build-preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 69ddb711a..395dcf4b1 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -106,13 +106,13 @@ jobs: npm exec tsx scripts/folder_diff ../samples-main ../samples-pr https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/ ${{ github.event.pull_request.head.sha }} mv pr_preview-extra.md ../pr/ cat ../pr/pr_preview-extra.md - mv samples-diff ../dist/ + mv samples-diff dist/ working-directory: pr-branch - name: Upload Build artifacts uses: actions/upload-artifact@v3 with: name: americana - path: dist/ + path: pr-branch/dist/ - name: Save PR attributes env: PR_NUMBER: ${{ github.event.pull_request.number }} From 09185bd9a60cc5c3f3ea86e846628c529c3a9d85 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 10:20:34 -0500 Subject: [PATCH 17/27] Add extra spritesheet rows --- scripts/stats_compare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/stats_compare.js b/scripts/stats_compare.js index 7f71e23ba..333f570b0 100644 --- a/scripts/stats_compare.js +++ b/scripts/stats_compare.js @@ -42,7 +42,7 @@ const ss2xRow = mdCompareRow( difference.spriteSheet2xSize ); -printTable("Style size statistics", [layersRow, sizeRow]); +printTable("Style size statistics", [layersRow, sizeRow, ss1xRow, ss2xRow]); /** * Show comparison of the number of layers in each group before and after From dbb7def62b503c3a32962bd308043c07ae261a1f Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 10:26:46 -0500 Subject: [PATCH 18/27] Add StyleJSON size output --- scripts/stats.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/stats.js b/scripts/stats.js index 05ec52d85..c493f120a 100644 --- a/scripts/stats.js +++ b/scripts/stats.js @@ -31,6 +31,11 @@ program "size of 2x sprite sheet" ).conflicts("allJson") ) + .addOption( + new Option("-sh, --shield-json-size", "size of ShieldJSON").conflicts( + "allJson" + ) + ) .option("-loc, --locales ", "language codes", ["mul"]) .option("-j, --all-json", "output all stats in JSON") .option("-pp, --pretty", "pretty-print JSON output") @@ -72,21 +77,29 @@ function spriteSheetSize(distDir, single) { ); } -const spriteSheet1xSize = spriteSheetSize(distDir, true); -const spriteSheet2xSize = spriteSheetSize(distDir, false); +function distFileSize(distDir, path) { + return fs.statSync(`${distDir}/${path}`).size; +} +const spriteSheet1xSize = spriteSheetSize(distDir, true); if (opts.spritesheet1xSize) { console.log(spriteSheet1xSize); process.exit(); } +const spriteSheet2xSize = spriteSheetSize(distDir, false); if (opts.spritesheet2xSize) { console.log(spriteSheet2xSize); process.exit(); } -const styleSize = JSON.stringify(layers).length; +const shieldJSONSize = distFileSize(distDir, "shields.json"); +if (opts.shieldJsonSize) { + console.log(shieldJSONSize); + process.exit(); +} +const styleSize = JSON.stringify(layers).length; if (opts.layerSize) { console.log(styleSize); process.exit(); @@ -100,6 +113,7 @@ const stats = { layerGroup: {}, spriteSheet1xSize, spriteSheet2xSize, + shieldJSONSize, }; for (let i = 0; i < layerCount; i++) { From 030417e25792c52c5532d584b31bc9b88c9e40c3 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 16 Dec 2023 10:37:50 -0500 Subject: [PATCH 19/27] Fix typo --- scripts/stats_compare.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/stats_compare.js b/scripts/stats_compare.js index 333f570b0..279171a60 100644 --- a/scripts/stats_compare.js +++ b/scripts/stats_compare.js @@ -28,6 +28,13 @@ const sizeRow = mdCompareRow( difference.styleSize ); +const shieldRow = mdCompareRow( + "ShieldJSON Size (b)", + stats1.shieldJSONSize, + stats2.shieldJSONSize, + difference.shieldJSONSize +); + const ss1xRow = mdCompareRow( "1x Sprite Sheet Size (b)", stats1.spriteSheet1xSize, @@ -42,7 +49,7 @@ const ss2xRow = mdCompareRow( difference.spriteSheet2xSize ); -printTable("Style size statistics", [layersRow, sizeRow, ss1xRow, ss2xRow]); +printTable("Style size statistics", [layersRow, sizeRow, ss1xRow, ss2xRow, shieldRow]); /** * Show comparison of the number of layers in each group before and after From a16733c4d990ccc2e71165cbe78c7f01c284a0b4 Mon Sep 17 00:00:00 2001 From: wmisener <58491489+wmisener@users.noreply.github.com> Date: Sun, 24 Dec 2023 11:41:13 -0800 Subject: [PATCH 20/27] Universities from z10 --- src/layer/poi.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/layer/poi.js b/src/layer/poi.js index c2447533d..07982176d 100644 --- a/src/layer/poi.js +++ b/src/layer/poi.js @@ -275,7 +275,7 @@ export const poi = { "parking", "police", "school", - "college", + ...getSubclasses(iconDefs.college), "townhall", ...getSubclasses(iconDefs.pow_christian), ...getSubclasses(iconDefs.pow_buddhist), @@ -296,9 +296,15 @@ export const poi = { [ "match", ["get", "subclass"], - ["station", "halt"], + [ + ...getSubclasses(iconDefs.college), + ], + 10, + [ + "station", + "halt"], 12, - ["bus_station", "subway", ...getSubclasses(iconDefs.college)], + ["bus_station", "subway"], 14, [ "bus_stop", From 5163ebf7d0f3952e0a790afd5bc97f424d35e024 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sat, 20 Apr 2024 14:02:54 -0400 Subject: [PATCH 21/27] add shields for Sierra County, CA and Washington County, UT --- src/js/shield_defs.js | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 4864535cc..528a99740 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -775,11 +775,14 @@ export function loadShields() { ["BUS"], Color.shields.green ); - shields["US:CA:CR"] = pentagonUpShield( - 3, - 15, - Color.shields.blue, - Color.shields.yellow + ["CR", "Sierra"].forEach( + (county) => + (shields[`US:CA:${county}`] = pentagonUpShield( + 3, + 15, + Color.shields.blue, + Color.shields.yellow + )) ); shields["US:CA:Mendocino"] = roundedRectShield( Color.shields.green, @@ -1141,8 +1144,8 @@ export function loadShields() { "Webster", "Winn", ].forEach( - (county) => - (shields[`US:LA:${county}`] = pentagonUpShield( + (parish) => + (shields[`US:LA:${parish}`] = pentagonUpShield( 3, 15, Color.shields.blue, @@ -2484,11 +2487,14 @@ export function loadShields() { bottom: 5, }, }; - shields["US:UT:Wayne"] = pentagonUpShield( - 3, - 15, - Color.shields.blue, - Color.shields.yellow + ["Wayne", "Washington"].forEach( + (county) => + (shields[`US:UT:${county}`] = pentagonUpShield( + 3, + 15, + Color.shields.blue, + Color.shields.yellow + )) ); // Virginia From 122c44b7c81baeaf8baa6171bd0eafe0ef24fd41 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sat, 20 Apr 2024 14:13:10 -0400 Subject: [PATCH 22/27] add Mississippi Scenic Route shields --- src/js/shield_defs.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 4864535cc..29faa11e8 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -1424,6 +1424,11 @@ export function loadShields() { // Mississippi shields["US:MS"] = ovalShield(Color.shields.white, Color.shields.black); + shields["US:MS:Scenic"] = banneredShield( + ovalShield(Color.shields.white, Color.shields.blue), + ["SCEN"], + Color.shields.blue + ); [ "Alcorn", "Calhoun", From 090400bbc4b5c66b30eedee09d747c9e8cb0898b Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Sun, 21 Apr 2024 16:03:02 -0400 Subject: [PATCH 23/27] update shield defs that use refsByName --- src/js/shield_defs.js | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 2772801b3..03f6c1bd9 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -3739,23 +3739,13 @@ export function loadShields() { }; shields["US:KY:Parkway"].refsByName = { - // FIXME: This object contains both spelled-out and abbreviated road - // names to accommodate both the abbreviated names from OpenMapTiles and - // the spelled-out names from Planetiler. - // https://github.com/onthegomap/planetiler/issues/14 "Audubon Parkway": "AU", "Bluegrass Parkway": "BG", - "Bluegrass Pkwy": "BG", "Cumberland Parkway": "LN", - "Cumberland Pkwy": "LN", "Hal Rogers Parkway": "HR", - "Hal Rogers Pkwy": "HR", "Mountain Parkway": "MP", - "Mountain Pkwy": "MP", "Purchase Parkway": "JC", - "Purchase Pkwy": "JC", "Western Kentucky Parkway": "WK", - "Western Kentucky Pkwy": "WK", }; shields["US:CT:Parkway"].overrideByName = { @@ -3795,15 +3785,13 @@ export function loadShields() { }; shields["US:NY:Parkway"].refsByName = { - "Bear Mountain Parkway": "BMP", - "Bronx and Pelham Parkway": "PP", + "Bear Mountain State Parkway": "BMP", "Bronx River Parkway": "BRP", "Cross County Parkway": "CCP", "Hutchinson River Parkway": "HRP", "Korean War Veterans Parkway": "KWVP", "Mosholu Parkway": "MP", "Niagara Scenic Parkway": "NSP", - "Pelham Parkway": "PP", "Saw Mill River Parkway": "SMP", "Sprain Brook Parkway": "SBP", "Taconic State Parkway": "TSP", @@ -3823,14 +3811,7 @@ export function loadShields() { "Fort Bend Westpark Tollway": "WPT", }; shields["US:TX:Harris:HCTRA"].refsByName = { - "East Sam Houston Tollway North": "SHT", - "East Sam Houston Tollway South": "SHT", - "North Sam Houston Tollway East": "SHT", - "North Sam Houston Tollway West": "SHT", - "South Sam Houston Tollway East": "SHT", - "South Sam Houston Tollway West": "SHT", - "West Sam Houston Tollway North": "SHT", - "West Sam Houston Tollway South": "SHT", + "Sam Houston Tollway": "SHT", "Fort Bend Toll Road": "FBTR", "Hardy Toll Road": "HTR", "Tomball Tollway": "TBT", From a4bb84abdcffb3a655106690c448612ef8745286 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Mon, 22 Apr 2024 11:39:50 -0400 Subject: [PATCH 24/27] Update shield_defs.js Restore test change --- src/js/shield_defs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 6a695a3a0..03f6c1bd9 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -503,7 +503,7 @@ export function loadShields() { textColor: Color.shields.brown, colorLighten: Color.shields.brown, }, - ["XYZA"], + ["HIST"], Color.shields.brown ); From 84a62f05d2478ac72a2fc563d4e89fcf4f26c0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 24 Apr 2024 21:22:29 -0700 Subject: [PATCH 25/27] Restored parks at z4 --- src/layer/park.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/layer/park.js b/src/layer/park.js index 662f3af01..bcf2cebd3 100644 --- a/src/layer/park.js +++ b/src/layer/park.js @@ -13,7 +13,6 @@ export const fill = { "fill-color": Color.parkFill, }, source: "openmaptiles", - minzoom: 5, "source-layer": "park", }; @@ -25,7 +24,6 @@ export const outline = { "line-color": Color.parkOutline, }, source: "openmaptiles", - minzoom: 5, metadata: {}, "source-layer": "park", }; From cf3b2613a253251bda18bd0994caf5a77143afc7 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Mon, 29 Apr 2024 19:11:05 -0400 Subject: [PATCH 26/27] Specify x64 --- .../workflows/{test-build-mac.yml => test-build-mac-x64.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{test-build-mac.yml => test-build-mac-x64.yml} (90%) diff --git a/.github/workflows/test-build-mac.yml b/.github/workflows/test-build-mac-x64.yml similarity index 90% rename from .github/workflows/test-build-mac.yml rename to .github/workflows/test-build-mac-x64.yml index e25e06941..333a58f15 100644 --- a/.github/workflows/test-build-mac.yml +++ b/.github/workflows/test-build-mac-x64.yml @@ -1,4 +1,4 @@ -name: Test Build (MacOS) +name: Test Build (MacOS x86_64) on: pull_request: @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: macos-latest + runs-on: macos-latest-large steps: - name: Checkout 🛎️ uses: actions/checkout@v3 From dae173827ce12c391cb736b78df2c4a854d01fa3 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Mon, 29 Apr 2024 21:16:18 -0400 Subject: [PATCH 27/27] Let's try this image --- .../{test-build-mac-x64.yml => test-build-macos-13.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{test-build-mac-x64.yml => test-build-macos-13.yml} (90%) diff --git a/.github/workflows/test-build-mac-x64.yml b/.github/workflows/test-build-macos-13.yml similarity index 90% rename from .github/workflows/test-build-mac-x64.yml rename to .github/workflows/test-build-macos-13.yml index 333a58f15..0258b2282 100644 --- a/.github/workflows/test-build-mac-x64.yml +++ b/.github/workflows/test-build-macos-13.yml @@ -1,4 +1,4 @@ -name: Test Build (MacOS x86_64) +name: Test Build (MacOS 13) on: pull_request: @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: macos-latest-large + runs-on: macos-13 steps: - name: Checkout 🛎️ uses: actions/checkout@v3