Skip to content

Commit

Permalink
Implement highway shields and interstate filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf committed Jan 2, 2022
1 parent c21037e commit 888d5ed
Show file tree
Hide file tree
Showing 25 changed files with 35,156 additions and 119 deletions.
15 changes: 5 additions & 10 deletions style/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
clean:
rm -rf sprites build icons/us_* rebusurance.zip
clean_sprites:
rm -rf sprites

rebusurance.zip:
curl -s -L https://github.com/1ec5/rebusurance/releases/download/v1.0.0/rebusurance-v1.0.0.zip --output rebusurance.zip
clean: clean_sprites
rm -rf build


build/rebusurance-v1.0.0: rebusurance.zip
unzip -q rebusurance.zip "*/image2d/*.svg" -d build

sprites: build/rebusurance-v1.0.0
scripts/import_rebusurance.sh
sprites: clean_sprites
mkdir -p sprites
npx spritezero sprites/sprite@2x icons/ --retina
npx spritezero sprites/sprite icons/
Expand Down
12 changes: 11 additions & 1 deletion style/americana.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import config from "./config.js";

import * as Util from "./js/util.js";
import * as Shield from "./js/shield.js";

import * as lyrBackground from "./layer/background.js";
import * as lyrBoundary from "./layer/boundary.js";
Expand Down Expand Up @@ -68,6 +69,7 @@ americanaLayers.push(
lyrRoad.primary.fill(),
lyrRoad.trunk.fill(),
lyrRoad.motorway.fill(),
lyrRoad.interstate.fill(),

lyrRoad.motorwayLink.surface(),
lyrRoad.trunkLink.surface(),
Expand Down Expand Up @@ -156,7 +158,11 @@ americanaLayers.push(

lyrPark.label,

lyrHighwayShield.interstate,
lyrHighwayShield.motorway,
lyrHighwayShield.trunk,
lyrHighwayShield.primary,
lyrHighwayShield.secondary,
lyrHighwayShield.tertiary,

lyrPlace.state,
lyrPlace.city,
Expand Down Expand Up @@ -205,6 +211,10 @@ var map = new maplibregl.Map({
attributionControl: false,
});

map.on("styleimagemissing", function (e) {
Shield.missingIconLoader(map, e);
});

map.addControl(
new maplibregl.AttributionControl({
customAttribution:
Expand Down
3 changes: 3 additions & 0 deletions style/icons/shield40_us_county.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions style/icons/shield40_us_interstate_2.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions style/icons/shield40_us_interstate_3.svg
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 style/icons/shield40_us_nc.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions style/icons/shield40_us_nh.svg
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 style/icons/shield40_us_nj_ace_noref.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 888d5ed

Please sign in to comment.