I wish to get the altitude of a given visible point on the map. If I setup terrain like so:
var source = RasterDemSource()
source.url = "mapbox://mapbox.mapbox-terrain-dem-v1"
try! style.addSource(source, id: "sourceId")
let terrain = Terrain(sourceId: "sourceId")
try mapView.mapboxMap.style.setTerrain(terrain)
I am able to get the altitude from the Raster DEM Tile by querying:
mapView.mapboxMap.elevation(at: position)
However, this only works if the terrain is set (which renders the map with terrain in 3D). Is there any way to query this information directly without displaying 3D terrain?
I wish to not rely on Tilequery API as I require offline support whilst allowing checking of elevation data over a large area.