Commit 824e3e2
[MAPS3D-2179] Add new
Closes https://mapbox.atlassian.net/browse/MAPS3D-2179
This PR adds a new layout property `line-elevation-ground-scale`, which
allows scaling line elevation data with terrain exaggeration for lines
that use `line-elevation-reference: "sea"`. Previously such lines were
always rendered at the exact elevation provided by the source data while
ignoring the terrain exaggeration value. This worked correctly as long
as terrain exaggeration was `1`. Disabling terrain by transitioning
terrain elevation to `0` would cause the elevated line to lose any
connection it had with the ground. Here's an example:
https://github.com/user-attachments/assets/a1b7e691-d850-491c-81e0-a7473810b765
With the new property it's possible to scale elevation values with
terrain exaggeration, either for the entire length of the line or for
parts of it only. For flight paths good results can be had by
interpolating at the start and end of the line. Here is an example of
using the property to keep the start and end of the flight path
connected with the ground:
```
"line-elevation-ground-scale": [
"interpolate",
[
"linear"
],
[
"line-progress"
],
0,
1,
0.1,
0,
0.9,
0,
1,
1
]
```
https://github.com/user-attachments/assets/92485a5c-b974-45e3-b0bb-67f1c38df68f
```
<public>
Add `line-elevation-ground-scale` property to scale elevated lines with terrain exaggeration (#9440)
</public>
```
cc @mapbox/gl-js
cc @mapbox/gl-native
cc @mapbox/maps-ios
cc @mapbox/maps-android
cc @mapbox/sdk-platform
---------
Co-authored-by: Changelog autocreator bot <actions@github.com>
(cherry picked from commit 5513c0747c841d28a588be8c8441d9fa0339f1fd)
GitOrigin-RevId: 5166ab994955594b95841554951496617f7957acline-elevation-ground-scale property to scale elevated lines with terrain exaggeration (#9440)1 parent 864f358 commit 824e3e2
10 files changed
Lines changed: 185 additions & 0 deletions
File tree
- Sources/MapboxMaps
- Annotations/Generated
- Style/Generated/Layers
- SwiftUI/Annotations/Generated
- Tests/MapboxMapsTests
- Annotations/Generated
- Style/Generated
- IntegrationTests/Layers
- Layers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments