Skip to content

Commit

Permalink
mapbox 4, rollup 4, node 22.
Browse files Browse the repository at this point in the history
lets make route a button while we debug the event handling.

add 30d weather layer.
  • Loading branch information
arichnad committed Jul 2, 2024
1 parent d680b7e commit 91f9b98
Show file tree
Hide file tree
Showing 14 changed files with 920 additions and 228 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* you need to set environment variable `CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN`
* `echo "CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN=$CYCLEMAPS_MAPBOX_PUBLIC_ACCESS_TOKEN" >.env`
* `./update.sh`
* `docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:18 npm install`
* `./install.sh`
* `./build.sh`

## non server-side layers
Expand Down
4 changes: 2 additions & 2 deletions build-production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e #exit on failure

#first time: npm install
docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:18 npm run build-production
#first time: ./install.sh
./npm.sh run build-production "$@"

4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e #exit on failure

#first time: npm install
docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:18 npm run build
#first time: ./install.sh
./npm.sh run build "$@"

16 changes: 16 additions & 0 deletions buttons.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"cycleway-paved": [{"propertyType": "layout", "property": "visibility", "value": "visible"}],
"cyclefriendly-paved": [{"propertyType": "layout", "property": "visibility", "value": "visible"}]
}},
{ "id": "route", "class": "route" },
{
"id": "satellite",
"class": "layer",
Expand Down Expand Up @@ -70,6 +71,21 @@
"https://mapservices.weather.noaa.gov/raster/rest/services/obs/rfc_qpe/MapServer/export?bbox={bbox-epsg-3857}&size=512,512&dpi=96&format=png8&transparent=true&bboxSR=3857&imageSR=3857&layers=show:56&f=image"
]
}
},
{
"id": "past-rain-30d",
"class": "rain",
"type": "raster",
"paint": {"raster-opacity": 0.5},
"beforeId": "rain-anchor",
"group": "weather",
"source": {
"type": "raster",
"tileSize": 2048,
"tiles" : [
"https://mapservices.weather.noaa.gov/raster/rest/services/obs/rfc_qpe/MapServer/export?bbox={bbox-epsg-3857}&size=512,512&dpi=96&format=png8&transparent=true&bboxSR=3857&imageSR=3857&layers=show:68&f=image"
]
}
}
]},
{ "id": "more", "name": "", "class": "directory", "source": [
Expand Down
2 changes: 1 addition & 1 deletion dist/cyclemaps.css

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions dist/cyclemaps.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
<li>if you notice a problem, please
<a class="osm-link" href="#" onclick="window.mainControl.openOsmEdit();">edit osm</a></li>
<li>"surface" is how we know what is unpaved</li>
<li>changes to osm take two weeks to propagate</li>
<li>changes to osm take months to propagate</li>
</ul>

<p>thanks to the many projects that this site depends on.</p>
Expand All @@ -197,12 +197,14 @@
<li><a href="https://github.com/maptiler/tileserver-gl/" target="_blank">maptiler tile server</a></li>
<li><a href="https://www.postgresql.org/" target="_blank">postgresql</a> &amp; <a href="https://postgis.net/" target="_blank">postgis</a></li>
<li><a href="https://www.wikidata.org/" target="_blank">wikidata</a></li>
<li><a href="http://project-osrm.org/" target="_blank">project osrm</a></li>
<!--<li><a href="https://project-osrm.org/" target="_blank">project osrm</a></li>-->
<li>mapbox satellite &amp; routing</li>
<!-- openmaptiles-tools -->
<li><a href="https://www.naturalearthdata.com/" target="_blank">natural earth</a></li>
<li><a href="https://github.com/pnorman/osmborder" target="_blank">osmborder</a></li>
<li><a href="https://omniscale.com/" target="_blank">omniscale</a></li>
<li><a href="https://github.com/maplibre/maplibre-gl-js" target="_blank">maplibre</a></li>
<li><a href="https://github.com/maplibre/maplibre-gl-js" target="_blank">maplibre</a> &amp; maplibre-directions</li>
<li><a href="https://github.com/jimmyrocks/maplibre-gl-vector-text-protocol/" target="_blank">maplibre-gl vector-text-protocol</a></li>
<li><a href="https://water.weather.gov/precip/about.php" target="_blank">national weather service advanced hydrologic prediction service</a></li>
<li><a href="https://maputnik.github.io/" target="_blank">maputnik</a></li>
<li><a href="https://www.docker.com/" target="_blank">docker</a> / <a href="https://ubuntu.com/" target="_blank">ubuntu</a> / <a href="https://www.gnu.org/" target="_blank">gnu</a> / <a href="https://www.kernel.org/" target="_blank">linux</a></li>
Expand Down
6 changes: 6 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e #exit on failure

./npm.sh install "$@"

6 changes: 6 additions & 0 deletions npm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -e #exit on failure

docker run --user=$(id --user):$(id --group) --rm --volume=.:/home --workdir=/home -it node:22 npm "$@"

Loading

0 comments on commit 91f9b98

Please sign in to comment.