Public Overloads Sub ShowElevationProfileGraph( _ ByVal elevationProfile As ElevationProfileResult _ )
public void ShowElevationProfileGraph( ElevationProfileResult elevationProfile )
Parameters
- elevationProfile
- The elevationProfile result.
Public Overloads Sub ShowElevationProfileGraph( _ ByVal elevationProfile As ElevationProfileResult _ )
public void ShowElevationProfileGraph( ElevationProfileResult elevationProfile )
| Exception | Description |
|---|---|
| System.ArgumentNullException | elevationProfile is null. |
| System.ArgumentException | An elevation profile cannot be displayed on the current map. |
| System.ArgumentException | The specified elevationProfile does not have a valid result that can be displayed in a profile. |
{
MapPoint startPt = MapPointBuilderEx.CreateMapPoint(-130, 20, SpatialReferences.WGS84);
MapPoint endPt = MapPointBuilderEx.CreateMapPoint(-100, 50, SpatialReferences.WGS84);
var elevProfileResult = await MapView.Active.Map.GetElevationProfileFromSurfaceAsync(startPt, endPt, 10);
if (elevProfileResult.Status != SurfaceZsResultStatus.Ok)
return;
if (!MapView.Active.CanShowElevationProfileGraph())
return;
// show the elevation profile using the result
MapView.Active.ShowElevationProfileGraph(elevProfileResult);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)