Commit fcaad81
[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>
GitOrigin-RevId: 5513c0747c841d28a588be8c8441d9fa0339f1fdline-elevation-ground-scale property to scale elevated lines with terrain exaggeration (#9440)1 parent a7b0c54 commit fcaad81
18 files changed
Lines changed: 657 additions & 0 deletions
File tree
- app/src/androidTest/java/com/mapbox/maps/testapp/annotation/generated
- extension-compose
- api
- Release
- src/main/java/com/mapbox/maps/extension/compose
- annotation/generated
- style/layers/generated
- extension-style-app/src/androidTest/java/com/mapbox/maps/testapp/style/layers/generated
- extension-style
- api
- Release
- src
- main/java/com/mapbox/maps/extension/style/layers/generated
- test/java/com/mapbox/maps/extension/style/layers/generated
- plugin-annotation
- api
- Release
- src
- main/java/com/mapbox/maps/plugin/annotation/generated
- test/java/com/mapbox/maps/plugin/annotation/generated
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
| 979 | + | |
979 | 980 | | |
980 | 981 | | |
981 | 982 | | |
| |||
1013 | 1014 | | |
1014 | 1015 | | |
1015 | 1016 | | |
| 1017 | + | |
1016 | 1018 | | |
1017 | 1019 | | |
1018 | 1020 | | |
| |||
1050 | 1052 | | |
1051 | 1053 | | |
1052 | 1054 | | |
| 1055 | + | |
1053 | 1056 | | |
1054 | 1057 | | |
1055 | 1058 | | |
| |||
1117 | 1120 | | |
1118 | 1121 | | |
1119 | 1122 | | |
| 1123 | + | |
1120 | 1124 | | |
1121 | 1125 | | |
1122 | 1126 | | |
| |||
1132 | 1136 | | |
1133 | 1137 | | |
1134 | 1138 | | |
| 1139 | + | |
1135 | 1140 | | |
1136 | 1141 | | |
1137 | 1142 | | |
| |||
1147 | 1152 | | |
1148 | 1153 | | |
1149 | 1154 | | |
| 1155 | + | |
1150 | 1156 | | |
1151 | 1157 | | |
1152 | 1158 | | |
| |||
2905 | 2911 | | |
2906 | 2912 | | |
2907 | 2913 | | |
| 2914 | + | |
| 2915 | + | |
2908 | 2916 | | |
2909 | 2917 | | |
2910 | 2918 | | |
| |||
2961 | 2969 | | |
2962 | 2970 | | |
2963 | 2971 | | |
| 2972 | + | |
| 2973 | + | |
2964 | 2974 | | |
2965 | 2975 | | |
2966 | 2976 | | |
| |||
3017 | 3027 | | |
3018 | 3028 | | |
3019 | 3029 | | |
| 3030 | + | |
| 3031 | + | |
3020 | 3032 | | |
3021 | 3033 | | |
3022 | 3034 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
| 784 | + | |
784 | 785 | | |
785 | 786 | | |
786 | 787 | | |
| |||
818 | 819 | | |
819 | 820 | | |
820 | 821 | | |
| 822 | + | |
821 | 823 | | |
822 | 824 | | |
823 | 825 | | |
| |||
880 | 882 | | |
881 | 883 | | |
882 | 884 | | |
| 885 | + | |
883 | 886 | | |
884 | 887 | | |
885 | 888 | | |
| |||
895 | 898 | | |
896 | 899 | | |
897 | 900 | | |
| 901 | + | |
898 | 902 | | |
899 | 903 | | |
900 | 904 | | |
| |||
2460 | 2464 | | |
2461 | 2465 | | |
2462 | 2466 | | |
| 2467 | + | |
| 2468 | + | |
2463 | 2469 | | |
2464 | 2470 | | |
2465 | 2471 | | |
| |||
2516 | 2522 | | |
2517 | 2523 | | |
2518 | 2524 | | |
| 2525 | + | |
| 2526 | + | |
2519 | 2527 | | |
2520 | 2528 | | |
2521 | 2529 | | |
| |||
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments