-
-
Notifications
You must be signed in to change notification settings - Fork 783
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
line
layer on Globe with Terrain3D (#4970)
- Loading branch information
Showing
12 changed files
with
367 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+7.98 KB
test/integration/render/tests/projection/globe/terrain/line-gradient/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 122 additions & 0 deletions
122
test/integration/render/tests/projection/globe/terrain/line-gradient/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
} | ||
}, | ||
"sky": { | ||
"atmosphere-blend": 0.0 | ||
}, | ||
"center": [ | ||
0.0, | ||
0.0 | ||
], | ||
"zoom": 1, | ||
"projection": { "type": "globe" }, | ||
"terrain": { | ||
"source": "terrain", | ||
"exaggeration": 2 | ||
}, | ||
"sources": { | ||
"terrain": { | ||
"type": "raster-dem", | ||
"tiles": ["local://tiles/{z}-{x}-{y}.terrain.png"], | ||
"maxzoom": 15, | ||
"tileSize": 256 | ||
}, | ||
"fill": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-180, | ||
-90 | ||
], | ||
[ | ||
-180, | ||
90 | ||
], | ||
[ | ||
180, | ||
90 | ||
], | ||
[ | ||
180, | ||
-90 | ||
], | ||
[ | ||
-180, | ||
-90 | ||
] | ||
] | ||
] | ||
} | ||
}, | ||
"line": { | ||
"type": "geojson", | ||
"lineMetrics": true, | ||
"data": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-90, | ||
-85 | ||
], | ||
[ | ||
90, | ||
85 | ||
] | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "fill", | ||
"type": "fill", | ||
"source": "fill", | ||
"paint": { | ||
"fill-antialias": false, | ||
"fill-color": "grey" | ||
} | ||
}, | ||
{ | ||
"id": "line", | ||
"type": "line", | ||
"source": "line", | ||
"paint": { | ||
"line-width": 10, | ||
"line-gradient": [ | ||
"interpolate-lab", | ||
[ | ||
"linear" | ||
], | ||
[ | ||
"line-progress" | ||
], | ||
0, | ||
"blue", | ||
0.1, | ||
"royalblue", | ||
0.3, | ||
"cyan", | ||
0.5, | ||
"lime", | ||
0.7, | ||
"yellow", | ||
1, | ||
"red" | ||
] | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+6.09 KB
test/integration/render/tests/projection/globe/terrain/line-spiral/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions
101
test/integration/render/tests/projection/globe/terrain/line-spiral/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
} | ||
}, | ||
"sky": { | ||
"atmosphere-blend": 0.0 | ||
}, | ||
"center": [ | ||
0.0, | ||
0.0 | ||
], | ||
"zoom": 1, | ||
"projection": { "type": "globe" }, | ||
"terrain": { | ||
"source": "terrain", | ||
"exaggeration": 2 | ||
}, | ||
"sources": { | ||
"terrain": { | ||
"type": "raster-dem", | ||
"tiles": ["local://tiles/{z}-{x}-{y}.terrain.png"], | ||
"maxzoom": 15, | ||
"tileSize": 256 | ||
}, | ||
"fill": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Polygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-180, | ||
-90 | ||
], | ||
[ | ||
-180, | ||
90 | ||
], | ||
[ | ||
180, | ||
90 | ||
], | ||
[ | ||
180, | ||
-90 | ||
], | ||
[ | ||
-180, | ||
-90 | ||
] | ||
] | ||
] | ||
} | ||
}, | ||
"line": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-1440, | ||
-85 | ||
], | ||
[ | ||
1440, | ||
85 | ||
] | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "fill", | ||
"type": "fill", | ||
"source": "fill", | ||
"paint": { | ||
"fill-antialias": false, | ||
"fill-color": "grey" | ||
} | ||
}, | ||
{ | ||
"id": "line", | ||
"type": "line", | ||
"source": "line", | ||
"paint": { | ||
"line-width": 10, | ||
"line-color": "red" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+7.34 KB
test/integration/render/tests/projection/globe/terrain/line-translate/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.