Skip to content

Commit

Permalink
feat: Remove bearing and pitch for default tests. (#416)
Browse files Browse the repository at this point in the history
#### Description
Adding bearing and pitch taking too much CPU, we still can validate
screenshots without bearing and pitch.



#### Intention
*Why is this change being made? What implications or other
considerations are there?*



#### Checklist
*If not applicable, provide explanation of why.*
- [ ] Tests updated
- [ ] Docs updated
- [ ] Issue linked in Title
  • Loading branch information
Wentao-Kuang authored Jul 16, 2024
1 parent 9979552 commit 99b800e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ async function takeScreenshots(
searchParam.set('p', test.tileMatrix);
searchParam.set('i', test.tileSet);
if (test.style) searchParam.set('s', test.style);
if (test.terrain) searchParam.set('debug.terrain', test.terrain);
if (test.terrain) {
searchParam.set('terrain', test.terrain);
searchParam.set('debug.terrain', test.terrain);
}
if (test.hillshade) searchParam.set('debug.hillshade', test.hillshade);

const bearing = test.location.b ? test.location.b : 0;
Expand Down
12 changes: 6 additions & 6 deletions src/tiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const DefaultTestTiles: TestTile[] = [
{
name: 'aerial-3857-terrain-hillshade-z6',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -45.0735206, lng: 169.1674805, z: 6, b: 18, p: 55 },
location: { lat: -45.0735206, lng: 169.1674805, z: 6 },
tileSet: 'aerial',
style: 'aerial',
terrain: 'LINZ-Terrain',
Expand All @@ -136,15 +136,15 @@ export const DefaultTestTiles: TestTile[] = [
{
name: 'aerial-3857-wellington-urban-terrain-z13',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -41.3040702, lng: 174.7730613, z: 14, b: -14, p: 60 },
location: { lat: -41.3040702, lng: 174.7730613, z: 14 },
tileSet: 'aerial',
style: 'aerial',
terrain: 'LINZ-Terrain',
},
{
name: 'aerial-3857-mount-taranaki-terrain-hillshade-z14',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -39.3031717, lng: 174.0585208, z: 14, b: 46, p: 43 },
location: { lat: -39.3031717, lng: 174.0585208, z: 14 },
tileSet: 'aerial',
style: 'aerial',
terrain: 'LINZ-Terrain',
Expand All @@ -153,7 +153,7 @@ export const DefaultTestTiles: TestTile[] = [
{
name: 'topographic-3857-terrain-hillshade-z12',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -42.4146988, lng: 174.1766669, z: 5, b: 13, p: 46 },
location: { lat: -42.4146988, lng: 174.1766669, z: 5 },
tileSet: 'topographic',
style: 'topographic',
terrain: 'LINZ-Terrain',
Expand All @@ -162,7 +162,7 @@ export const DefaultTestTiles: TestTile[] = [
{
name: 'topographic-3857-tauranga-terrain-z12',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -37.7635905, lng: 176.2261963, z: 12, p: 60 },
location: { lat: -37.7635905, lng: 176.2261963, z: 12 },
tileSet: 'topographic',
style: 'topographic',
terrain: 'LINZ-Terrain',
Expand All @@ -178,7 +178,7 @@ export const DefaultTestTiles: TestTile[] = [
{
name: 'topolite-3857-christchurch-rural-terrain-hillshade-z10',
tileMatrix: TileMatrixIdentifier.Google,
location: { lat: -43.6547079, lng: 172.6999283, z: 10, b: 32, p: 60 },
location: { lat: -43.6547079, lng: 172.6999283, z: 10 },
tileSet: 'topographic',
style: 'topolite',
terrain: 'LINZ-Terrain',
Expand Down

0 comments on commit 99b800e

Please sign in to comment.