Click or drag to resize

ElevationSource Class

Base class for all elevation sources.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
Syntax
public abstract class ElevationSource : ILoadable, 
	INotifyPropertyChanged

The ElevationSource type exposes the following members.

Properties
  NameDescription
Public propertyIsEnabled
Gets or sets the enabled state of the elevation source.
Public propertyLoadError
Gets the load error of the elevation source (null if loading was successful).
Public propertyLoadStatus
Gets the load status of the elevation source.
Public propertyName
Gets or sets the name of the elevation source.
Top
Methods
  NameDescription
Public methodCancelLoad
Cancels an ongoing load.
Public methodLoadAsync
Initiates loading of the elevation source.
Public methodRetryLoadAsync
Retry loading the elevation source.
Top
Events
  NameDescription
Public eventLoaded
Occurs when the elevation source is loaded.
Public eventLoadStatusChanged
Occurs when the elevation source LoadStatus property is changed.
Public eventPropertyChanged
Occurs when a property value changes.
Top
Examples

WPF

Example Name: ChangeAtmosphereEffect

Changes the appearance of the atmosphere in a scene.

Code example screen shot.

C#
// Copyright 2019 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.UI;
using System;

namespace ArcGISRuntime.WPF.Samples.ChangeAtmosphereEffect
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        name: "Change atmosphere effect",
        category: "Scene",
        description: "Changes the appearance of the atmosphere in a scene.",
        instructions: "Select one of the three available atmosphere effects. The sky will change to display the selected atmosphere effect. ",
        tags: new[] { "atmosphere", "horizon", "sky" })]
    public partial class ChangeAtmosphereEffect
    {
        private readonly string _elevationServiceUrl = "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer";

        public ChangeAtmosphereEffect()
        {
            InitializeComponent();
            Initialize();
        }

        private void Initialize()
        {
            // Create the scene with a basemap.
            MySceneView.Scene = new Scene(BasemapStyle.ArcGISImageryStandard);

            // Add an elevation source to the scene.
            Surface elevationSurface = new Surface();
            ArcGISTiledElevationSource elevationSource = new ArcGISTiledElevationSource(new Uri(_elevationServiceUrl));
            elevationSurface.ElevationSources.Add(elevationSource);
            MySceneView.Scene.BaseSurface = elevationSurface;

            // Set the initial viewpoint.
            Camera initialCamera = new Camera(64.416919, -14.483728, 100, 318, 105, 0);
            MySceneView.SetViewpointCamera(initialCamera);

            // Apply the selected atmosphere effect option.
            RealisticOption.Selected += (sender, e) => MySceneView.AtmosphereEffect = AtmosphereEffect.Realistic;
            HorizonOnlyOption.Selected += (sender, e) => MySceneView.AtmosphereEffect = AtmosphereEffect.HorizonOnly;
            NoneOption.Selected += (sender, e) => MySceneView.AtmosphereEffect = AtmosphereEffect.None;
        }
    }
}
XAML
<UserControl x:Class="ArcGISRuntime.WPF.Samples.ChangeAtmosphereEffect.ChangeAtmosphereEffect"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
        <esri:SceneView x:Name="MySceneView"/>
        <Border Style="{StaticResource BorderStyle}">
            <ComboBox IsEditable="False">
                <ComboBoxItem x:Name="RealisticOption">Realistic</ComboBoxItem>
                <ComboBoxItem x:Name="HorizonOnlyOption" IsSelected="True">Horizon only</ComboBoxItem>
                <ComboBoxItem x:Name="NoneOption">None</ComboBoxItem>
            </ComboBox>
        </Border>
    </Grid>
</UserControl>
See Also
Additional Examples
Hyperlink to ExampleDescription
AddAnIntegratedMeshLayerView an integrated mesh layer from a scene service.
Animate3DGraphicAn `OrbitGeoElementCameraController` follows a graphic while the graphic's position and rotation are animated.
ChangeAtmosphereEffectChanges the appearance of the atmosphere in a scene.
ChooseCameraControllerControl the behavior of the camera in a scene.
CreateTerrainSurfaceRasterSet the terrain surface with elevation described by a raster file.
CreateTerrainSurfaceTilePackageSet the terrain surface with elevation described by a local tile package.
DisplaySceneDisplay a scene with a terrain surface and some imagery.
DistanceMeasurementMeasure distances between two points in 3D.
GetElevationAtPointGet the elevation for a given point on a surface in a scene.
LineOfSightGeoElementShow a line of sight between two moving objects.
LineOfSightLocationPerform a line of sight analysis between two points in real time.
ListKmlContentsList the contents of a KML file.
PlayKmlToursPlay tours in KML files.
SceneLayerSelectionIdentify features in a scene to select.
SceneLayerUrlDisplay an ArcGIS scene layer from a URL.
SceneSymbolsShow various kinds of 3D symbols in a scene.
SurfacePlacementsPosition graphics relative to a surface using different surface placement modes.
TerrainExaggerationVertically exaggerate terrain in a scene.
ViewPointCloudDataOfflineDisplay local 3D point cloud data.
ViewshedCameraAnalyze the viewshed for a camera. A viewshed shows the visible and obstructed areas from an observer's vantage point.
ViewshedGeoElementAnalyze the viewshed for an object (GeoElement) in a scene.
ViewshedLocationPerform a viewshed analysis from a defined vantage point.