Skip to content

Commit

Permalink
Highlight all synthesized-network countries on shield status map
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Jan 31, 2023
1 parent 7e9c396 commit 2df639c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 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.
6 changes: 2 additions & 4 deletions scripts/status_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ function fillPaths(svg, codes) {
// Routes in United States insular areas use US prefix with the U.S.
selectors.add(".ust");
}
// Great Britain uses OpenMapTiles special processing
selectors.add(".gb");
return svg.replace(".supported", new Array(...selectors).join(",\n"));
}

Expand All @@ -27,9 +25,9 @@ let worldSVG = fs.readFileSync(`${process.cwd()}/scripts/blank_map_world.svg`, {
worldSVG = fillPaths(
worldSVG,
Object.keys(shields)
.map((network) => network.match(/^(\w\w)(?::|$)/))
.map((network) => network.match(/^(\w\w)(?::|$)|^omt-(\w\w)-/))
.filter((m) => m)
.map((m) => m[1])
.map((m) => m[1] || m[2])
);
worldSVG = worldSVG.replace(
/<title>.+?<\/title>/,
Expand Down

0 comments on commit 2df639c

Please sign in to comment.