Skip to content

Commit

Permalink
Add health json
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Jul 18, 2024
1 parent a2a6bee commit ca87925
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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
Expand Down
29 changes: 29 additions & 0 deletions config/style/health_aerial_terrain.json
Original file line number Diff line number Diff line change
@@ -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
}
14 changes: 14 additions & 0 deletions test.json
Original file line number Diff line number Diff line change
@@ -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"
}
]

0 comments on commit ca87925

Please sign in to comment.