diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d79ffc1b..dfba5c70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -251,7 +251,7 @@ jobs: # Wait for the server to start timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/v1/version)" != "200" ]]; do sleep 0.5; done' || false - docker run --rm --network="host" -v $PWD:$PWD ${DOCKER_AWS_ENV} ${SCREENSHOT_CONTAINER} --url http://localhost:5000 --output $PWD/.artifacts/visual-snapshots + docker run --rm --network="host" -v $PWD:$PWD ${DOCKER_AWS_ENV} ${SCREENSHOT_CONTAINER} --test $PWD/test.json --url http://localhost:5000 --output $PWD/.artifacts/visual-snapshots - name: Save snapshots uses: getsentry/action-visual-snapshot@v2 diff --git a/config/style/aerial.json b/config/style/health_aerial_hillshade.json similarity index 70% rename from config/style/aerial.json rename to config/style/health_aerial_hillshade.json index bc480c04..45a01ce2 100644 --- a/config/style/aerial.json +++ b/config/style/health_aerial_hillshade.json @@ -1,10 +1,16 @@ { - "id": "st_aerial", + "id": "st_health_aerial_hillshade", "layers": [ { "id": "Aerial-Imagery", "source": "LINZ-Basemaps", "type": "raster" + }, + { + "id": "LINZ-HillShade", + "paint": { "hillshade-shadow-color": "#040404" }, + "source": "LINZ-Terrain", + "type": "hillshade" } ], "name": "aerial", @@ -19,12 +25,6 @@ "tileSize": 256, "tiles": ["/v1/tiles/elevation/{tileMatrix}/{z}/{x}/{y}.png?pipeline=terrain-rgb"], "type": "raster-dem" - }, - "__hillshade-LINZ-Terrain": { - "maxzoom": 18, - "tileSize": 256, - "tiles": ["/v1/tiles/elevation/{tileMatrix}/{z}/{x}/{y}.png?pipeline=terrain-rgb"], - "type": "raster-dem" } }, "version": 8 diff --git a/config/style/health_aerial_terrain.json b/config/style/health_aerial_terrain.json new file mode 100644 index 00000000..d6e11ed2 --- /dev/null +++ b/config/style/health_aerial_terrain.json @@ -0,0 +1,29 @@ +{ + "id": "st_health_aerial_terrain", + "layers": [ + { + "id": "Aerial-Imagery", + "source": "LINZ-Basemaps", + "type": "raster" + } + ], + "name": "aerial", + "sources": { + "LINZ-Basemaps": { + "tileSize": 256, + "tiles": ["/v1/tiles/aerial/{tileMatrix}/{z}/{x}/{y}.webp"], + "type": "raster" + }, + "LINZ-Terrain": { + "maxzoom": 18, + "tileSize": 256, + "tiles": ["/v1/tiles/elevation/{tileMatrix}/{z}/{x}/{y}.png?pipeline=terrain-rgb"], + "type": "raster-dem" + } + }, + "terrain": { + "exaggeration": 1.2, + "source": "LINZ-Terrain" + }, + "version": 8 +} diff --git a/test.json b/test.json new file mode 100644 index 00000000..93f09092 --- /dev/null +++ b/test.json @@ -0,0 +1,14 @@ +[ + { + "name": "health-aerial-terrain-3857-z5", + "tileMatrix": "WebMercatorQuad", + "location": { "lat": -41.8899962, "lng": 174.0492437, "z": 5 }, + "tileSet": "health_aerial_terrain" + }, + { + "name": "health-aerial-hillshade-3857-z5", + "tileMatrix": "WebMercatorQuad", + "location": { "lat": -41.8899962, "lng": 174.0492437, "z": 5 }, + "tileSet": "health_aerial_hillshade" + } +]