Get elevation at a point
Get the elevation for a given point on a surface in a scene.
Knowing the elevation at a given point in a landscape can aid in navigation, planning and survey in the field.
Tap anywhere on the surface to get the elevation at that point. Elevation is reported in meters since the scene view is in WGS84.
- Create a
Scenewith an imagery base map.
- Set an
ArcGISTiledElevationSourceas the elevation source of the scene's base surface.
- Use the
GetElevationAsync(surfacePoint)method on the base surface to asynchronously get the elevation.
GetElevationAsync(surfacePoint) retrieves the most accurate available elevation value at a given point. To do this, the method must go to the server or local raster file and load the highest level of detail of data for the target location and return the elevation value.
If multiple elevation sources are present in the surface, the top most visible elevation source with a valid elevation in the given location is used to determine the result.
elevation, point, surface
<ContentPage x:Class="ArcGISRuntimeXamarin.Samples.GetElevationAtPoint.GetElevationAtPoint" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"> <StackLayout Orientation="Vertical"> <Label Margin="5" HorizontalTextAlignment="Center" Text="Tap to find the elevation for a point." VerticalOptions="Start" VerticalTextAlignment="Center" /> <esriUI:SceneView x:Name="MySceneView" VerticalOptions="FillAndExpand" /> </StackLayout> </ContentPage>