Skip to content

Commit 824e3e2

Browse files
lasselammiactions-user
authored andcommitted
[MAPS3D-2179] Add new line-elevation-ground-scale property to scale elevated lines with terrain exaggeration (#9440)
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: 5166ab994955594b95841554951496617f7957ac
1 parent 864f358 commit 824e3e2

10 files changed

Lines changed: 185 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Mapbox welcomes participation and contributions from everyone.
88

99
### Features ✨ and improvements 🏁
1010
* Introduce experimental `queryRenderedRasterValues` API for querying the rendered raster array value at a point on the map.
11+
* Introduce new `LineLayer.lineElevationGroundScale` property to scale elevated lines with terrain exaggeration.
12+
13+
### Bug fixes 🐞
14+
* Fix `FrameViewAnnotationsExample` annotations disappearing before shadow leaves the screen.
15+
1116
## 11.18.0 - 15 January, 2026
1217

1318
### Bug fixes 🐞

Sources/MapboxMaps/Annotations/Generated/PolylineAnnotation.swift

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MapboxMaps/Annotations/Generated/PolylineAnnotationManager.swift

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MapboxMaps/Style/Generated/Layers/LineLayer.swift

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MapboxMaps/SwiftUI/Annotations/Generated/PolylineAnnotationGroup.swift

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationIntegrationTests.swift

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationManagerTests.swift

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationTests.swift

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/MapboxMapsTests/Style/Generated/IntegrationTests/Layers/LineLayerIntegrationTests.swift

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/MapboxMapsTests/Style/Generated/Layers/LineLayerTests.swift

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

Comments
 (0)