Hello,
I have a question regarding elevation using the MapView in the ArcGIS SDK for Swift.
My use case is: when long pressing on the map, I would like to display a sheet with details about that location, including elevation data.
To accomplish this, I am currently adding a hidden SceneView behind the MapView. I then configure the scene with a base surface using a world elevation source. To synchronize the scene's viewpoint with the map, I listen for viewpoint changes on the map and continuously apply them to the scene. Then when the user long presses on the MapView, I get the elevation from the scene using:
let elevation = try? await scene.baseSurface.elevation(at: point)
This works, but has performance and memory implications.
Is there a way to get elevation information for a point only using the MapView?
For reference, I am using SwiftUI in Xcode 16, with arcgis-maps-sdk-swift version is 200.5.1.
Thank you!