Click or drag to resize

ArcGISSceneLayer Class

A class that represents a layer that renders scene services or local scene packages.
Inheritance Hierarchy
SystemObject
  Esri.ArcGISRuntime.MappingLayer
    Esri.ArcGISRuntime.MappingArcGISSceneLayer

Namespace:  Esri.ArcGISRuntime.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.7.0.0
Syntax
C#
public sealed class ArcGISSceneLayer : Layer

The ArcGISSceneLayer type exposes the following members.

Constructors
  NameDescription
Public methodArcGISSceneLayer
Initializes a new instance of the ArcGISSceneLayer class.
Public methodCode exampleArcGISSceneLayer(Uri)
Initializes a new instance of the ArcGISSceneLayer class with the specified URI.
Public methodArcGISSceneLayer(Item)
Initializes a new instance of the ArcGISSceneLayer class from the specified PortalItem.
Top
Properties
  NameDescription
Public propertyAltitudeOffset
Gets or sets the altitude offset on the layer.
Public propertyAttribution
Gets the attribution text for the layer.
(Inherited from Layer.)
Public propertyCanChangeVisibility
Gets a value indicating whether the layer content's visibility can be changed.
(Inherited from Layer.)
Public propertyCredential
Gets or sets the Credential used to access a remote service.
Public propertyDataType
Gets a value identifying the type of content within this layer.
Public propertyDescription
Gets the description for the layer.
(Inherited from Layer.)
Public propertyFeatureTable
Gets the feature table associated with this layer.
Public propertyCode exampleFullExtent
Gets the full extent of the layer, which is the extent where all the data in the layer is contained.
(Inherited from Layer.)
Public propertyCode exampleId
Gets or sets an identifier for the layer
(Inherited from Layer.)
Public propertyIsIdentifyEnabled
Gets a value indicating whether the layer supports the identify operation.
(Inherited from Layer.)
Public propertyCode exampleIsVisible
Gets or sets a value indicating whether the layer content is visible.
(Inherited from Layer.)
Public propertyItem
Gets the ArcGIS Item
(Inherited from Layer.)
Public propertyLoadError
Gets the load error of the layer, if there is one.
(Inherited from Layer.)
Public propertyCode exampleLoadStatus
Gets the load status of the layer.
(Inherited from Layer.)
Public propertyCode exampleMaxScale
Gets or sets the maximum scale where the layer is visible.
(Inherited from Layer.)
Public propertyCode exampleMinScale
Gets or sets the minimum scale where the layer is visible.
(Inherited from Layer.)
Public propertyCode exampleName
Gets or sets the name of the layer content.
(Inherited from Layer.)
Public propertyCode exampleOpacity
Gets or sets the opacity of the layer.
(Inherited from Layer.)
Public propertyShowInLegend
Gets or sets a value indicating whether the layer content participates in the legend.
(Inherited from Layer.)
Public propertySource
Gets or sets the endpoint of the scene service layer or the path to a scene layer package.
Public propertySpatialReference
Gets the spatial reference of the layer.
(Inherited from Layer.)
Public propertyCode exampleSublayerContents
Gets the sub layer contents of a layer content.
(Inherited from Layer.)
Public propertySurfacePlacement
Gets or sets the SurfacePlacement for the layer scene properties.
Top
Methods
  NameDescription
Public methodCancelLoad
Cancels an ongoing load.
(Inherited from Layer.)
Public methodCode exampleClearSelection
Clears all selected features.
Public methodCode exampleClone
Clones this instance of Layer and its members.
(Inherited from Layer.)
Public methodGetLegendInfosAsync
Returns an immutable list of LegendInfo.
(Inherited from Layer.)
Public methodGetSelectedFeaturesAsync
Returns a list of the currently selected features.
Public methodIsVisibleAtScale
Returns the layer content's effective visibility at the specified scale.
(Inherited from Layer.)
Public methodCode exampleLoadAsync
Initiates loading of a layer
(Inherited from Layer.)
Public methodRetryLoadAsync
Retry loading the layer.
(Inherited from Layer.)
Public methodCode exampleSelectFeature
Selects the given feature and adds it to the current list of selected features.
Public methodSelectFeatures
Selects the features in the list and adds them to the current list of selected features.
Public methodUnselectFeature
Unselects the given feature and removes it from the current list of selected features.
Public methodUnselectFeatures
Unselects the features in the given list and removes them from the current list of selected features.
Top
Events
  NameDescription
Public eventCode exampleLoaded
Occurs when the layer is loaded.
(Inherited from Layer.)
Public eventCode exampleLoadStatusChanged
Occurs when the layer LoadStatus is changed.
(Inherited from Layer.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)
Top
Remarks
Scene services display three-dimensional data on a globe.
Examples

Android

Example Name: AddPointSceneLayer

View a point scene layer from a scene service.

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 Android.App;
using Android.OS;
using Android.Widget;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.UI.Controls;
using System;

namespace ArcGISRuntimeXamarin.Samples.AddPointSceneLayer
{
    [Activity (ConfigurationChanges=Android.Content.PM.ConfigChanges.Orientation | Android.Content.PM.ConfigChanges.ScreenSize)]
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        "Add a point scene layer",
        "Layers",
        "View a point scene layer from a scene service.",
        "")]
    public class AddPointSceneLayer : Activity
    {
        // Hold references to the UI controls.
        private SceneView _mySceneView;

        // URL for the service with the point scene layer.
        private const string PointSceneServiceUri = "https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Airports_PointSceneLayer/SceneServer/layers/0";

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Title = "Add a point scene layer";

            CreateLayout();
            Initialize();
        }

        private void Initialize()
        {
            // Create the scene.
            _mySceneView.Scene = new Scene(Basemap.CreateImagery());

            // Create the layer.
            ArcGISSceneLayer pointSceneLayer = new ArcGISSceneLayer(new Uri(PointSceneServiceUri));

            // Show the layer in the scene.
            _mySceneView.Scene.OperationalLayers.Add(pointSceneLayer);
        }

        private void CreateLayout()
        {
            // Create a new vertical layout for the app.
            var layout = new LinearLayout(this) {Orientation = Orientation.Vertical};

            // Add the map view to the layout.
            _mySceneView = new SceneView(this);
            layout.AddView(_mySceneView);

            // Show the layout in the app.
            SetContentView(layout);
        }
    }
}
Examples

Xamarin Forms Android

Example Name: AddPointSceneLayer

View a point scene layer from a scene service.

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 System;
using Esri.ArcGISRuntime.Mapping;
using Xamarin.Forms;

namespace ArcGISRuntimeXamarin.Samples.AddPointSceneLayer
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        "Add a point scene layer",
        "Layers",
        "View a point scene layer from a scene service.",
        "")]
    public partial class AddPointSceneLayer : ContentPage
    {
        // URL for the service with the point scene layer.
        private const string PointSceneServiceUri = "https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Airports_PointSceneLayer/SceneServer/layers/0";

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

        private void Initialize()
        {
            // Create the scene.
            MySceneView.Scene = new Scene(Basemap.CreateImagery());

            // Create the layer.
            ArcGISSceneLayer pointSceneLayer = new ArcGISSceneLayer(new Uri(PointSceneServiceUri));

            // Show the layer in the scene.
            MySceneView.Scene.OperationalLayers.Add(pointSceneLayer);
        }
    }
}
XAML
<ContentPage 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"
             x:Class="ArcGISRuntimeXamarin.Samples.AddPointSceneLayer.AddPointSceneLayer">
    <Grid>
        <esriUI:SceneView x:Name="MySceneView" />
    </Grid>
</ContentPage>
See Also
Additional Examples
Hyperlink to ExampleDescription
AddPointSceneLayerView a point scene layer from a scene service.
DistanceMeasurementMeasure distances between two points in 3D.
GroupLayersGroup a collection of layers together and toggle their visibility as a group.
LineOfSightGeoElementShow a line of sight between two moving objects.
SceneLayerSelectionIdentify GeoElements in a scene layer.
SceneLayerUrlDisplay an ArcGIS scene layer from a URL.
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. Viewshed analyses have several configuration options that are demonstrated in this sample.