Skip To Content ArcGIS for Developers Sign In Dashboard

Scene QML Type

A scene which can be displayed on the screen using a scene view. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Signals

Methods

Detailed Description

A scene represents the model in an MVC architecture and a scene view represents the view. A scene specifies how the geographic data is organized, and a scene view renders the data and allows users to interact with it.

A scene derives its geographic content from its basemap and operational layers. A basemap provides a geographical context for the content you want to display on the scene. It is a background locational reference where you can overlay your operational layers. The basemap content is typically geographic features that do not change frequently, such as streets, parcel boundaries, or rivers. Operational layers provide application content for the task at hand. Their content might change frequently with updates from buildings, earthquake, or weather reports.

The scene has a spatial reference that specifies how the geographic content from its basemap and operational layers are aligned when combined together. The first layer that is added to the scene will set the spatial reference.

Once the scene's spatial reference is set, it cannot be changed, even by changing the basemap.

In the event that any combination of item, initUrl, and basemap properties are set when the scene initializes, the software chooses how to initialize the scene depending on which properties are set. The precedence order for these properties is as follows.

The initUrl and item properties can only be set at scene initialization time. For example, if a scene is created using a basemap, and later the item property is set in a JavaScript function, nothing will happen because the scene was already initialized with the basemap.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
Basemapbasemap
SurfacebaseSurface
LayeroperationalLayers (appends to model)
Bookmarkbookmarks (appends to model)
ViewpointinitialViewpoint
LoadSettingsloadSettings (since Esri.ArcGISRuntime 100.2)
ArcGISItemitem (since Esri.ArcGISRuntime 100.3)
FeatureTabletables (appends to model) since Esri.ArcGISRuntime 100.3

If operational layers are added to an existing scene by nesting them inside the scene's declaration, then the scene's original list of operational layers is overridden to only contain the added layers. To keep the scene's original operational layers and also add new ones, wait until the scene's loadStatus property is Enums.LoadStatusLoaded before adding operational layers. You can declare new operational layers outside the scene's declaration, and use a signal handler for the loadStatusChanged signal to add the new operational layers.

Example:

Create a Scene with the World Imagery basemap and the World Elevation surface:

// Create a scene view
SceneView {
    anchors.fill: parent

    // create a scene...scene is a default property of sceneview
    // and thus will get added to the sceneview
    Scene {
        // add a basemap
        BasemapImagery {}

        // add a surface...surface is a default property of scene
        Surface {
            // add an arcgis tiled elevation source...elevation source is a default property of surface
            ArcGISTiledElevationSource {
                url: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
            }
        }
    }

    Component.onCompleted: {
        // set viewpoint to the specified camera
        setViewpointCameraAndWait(camera);
    }
}

See also Loadable.

Property Documentation

autoFetchLegendInfos : bool

Whether legend infos are automatically fetched by the scene's operational layers.

Set to true (default is false) to have legend infos fetched automatically when the LegendInfoListModel is instantiated.


[default] baseSurface : Surface

The surface of the scene.


[default] basemap : Basemap

The basemap of the scene.


[default] bookmarks : BookmarkListModel

Returns the list model for bookmarks in the Scene (read-only).


error : Error

Returns the error object (read-only).

See also Loadable and Error.


initUrl : url

The URL used to initialize the scene.

This property can only be set one time.

Note: Assigning the item property will not automatically make the initUrl property valid.

The initUrl can be one of three possible types that refer to a PortalItem

  • The item details page : http://www.myPortal.com/home/item.html?id=12345678901234567890123456789012
  • The web scene view page : http://www.myPortal.com/home/webscene/viewer.html?webscene=12345678901234567890123456789012
  • The sharing data url : http://www.myPortal.com/sharing/rest/content/items/12345678901234567890123456789012/data

This property was introduced in Esri.ArcGISRuntime 100.3.


[default] initialViewpoint : Viewpoint

The initial Viewpoint.


[default] item : ArcGISItem

Returns the item that was used to instantiate this scene.

This can only be assigned one time.

This property was introduced in Esri.ArcGISRuntime 100.3.


json : jsobject

JSON that can be used to instantiate the Scene.

Warning: This method supports both read and write, but the read functionality is not supported at 100.3. A scene may be created from json, but the json property will always be empty when reading it back.

This property was introduced in Esri.ArcGISRuntime 100.3.


legendInfos : LegendInfoListModel

Returns the list model containing legend infos for the scene's operational layers (read-only).


loadError : Error

Returns the load error (read-only).

Note: load errors are also reported on the error property and emit the errorChanged signal.

See also Loadable.


[default] loadSettings : LoadSettings

The load settings properties that can be used to make changes to how feature layers, which are loaded by this scene, are rendered.

This property was introduced in Esri.ArcGISRuntime 100.2.


loadStatus : Enums.LoadStatus

Returns the load status (read-only).

See also Loadable and Enums.LoadStatus.


[default] operationalLayers : LayerListModel

Returns the list model for operational layers in the Scene (read-only).


sceneViewTilingScheme : Enums.SceneViewTilingScheme

The tiling scheme of the scene.

The default value is Enums.SceneViewTilingSchemeWebMercator. The tiling scheme property is used by the SceneView to determine how to render tiled data. If this property was not set in advance of loading the scene, it will be determined during the Scene::load(). This will examine the SpatialReference of the first tiled elevation source (see ArcGISTiledElevationSource) or tiled layer in the basemap or operational layers (see ArcGISTiledLayer) to choose either Enums.SceneViewTilingSchemeGeographic or Enums.SceneViewTilingSchemeWebMercator values. The SceneViewTilingScheme must correspond to the SpatialReference for those layers to render correctly.

This property was introduced in Esri.ArcGISRuntime 100.2.

See also Enums.SceneViewTilingScheme.


spatialReference : SpatialReference

Returns the spatial reference (read-only).


[default] tables : FeatureTableListModel

Returns the list model for non-spatial tables in the Scene (read-only).

Tables can be added and removed from the scene through this model.

Tables are not loaded by default. Tables are loaded internally when asynchronous operations like query are performed. Alternatively, they can be loaded by calling load on each table.

This property was introduced in Esri.ArcGISRuntime 100.3.


transportationNetworks : list<TransportationNetworkDataset>

A collection of transportation network datasets defined for the scene (read-only).

Scene authors can use ArcGIS Pro to create mobile scene packages containing scenes that include transportation networks. If so, this property will be populated with the collection of TransportationNetworkDataset objects.

A TransportationNetworkDataset from this collection can be used to construct one of the network analysis tasks (such as RouteTask, ServiceAreaTask, and ClosestFacilityTask).

This property was introduced in Esri.ArcGISRuntime 100.7.


unknownJson : jsobject

Returns the unknown JSON from the source JSON.

This property was introduced in Esri.ArcGISRuntime 100.3.


unsupportedJson : jsobject

Returns the unsupported data from the source JSON.

This property was introduced in Esri.ArcGISRuntime 100.3.


version : string

Returns the version of this scene (read-only).

This property was introduced in Esri.ArcGISRuntime 100.3.


Signal Documentation

autoFetchLegendInfosChanged()

Emitted when the autoFetchLegendInfos property changes.

Note: The corresponding handler is onAutoFetchLegendInfosChanged.


baseSurfaceChanged()

Emitted when the baseSurface property changes.

Note: The corresponding handler is onBaseSurfaceChanged.


basemapChanged()

Emitted when the basemap property of this Scene changes.

Note: The corresponding handler is onBasemapChanged.


bookmarksChanged()

Emitted when the bookmarks property of this Scene changes.

This property may be populated after the scene loads.

Note: The corresponding handler is onBookmarksChanged.


initUrlChanged()

Emitted when the initUrl property of this Scene changes.

Note: The corresponding handler is onInitUrlChanged.

This signal was introduced in Esri.ArcGISRuntime 100.3.


initialViewpointChanged()

Emitted when the initialViewpoint property of this Scene changes.

Note: The corresponding handler is onInitialViewpointChanged.


itemChanged()

Emitted when the item property of this Scene changes.

Note: The corresponding handler is onItemChanged.

This signal was introduced in Esri.ArcGISRuntime 100.3.


legendInfosChanged()

Emitted when the legendInfos property changes.

Note: The corresponding handler is onLegendInfosChanged.


loadErrorChanged()

Emitted when the loadError property of this scene changes.

Note: load errors are also reported on the error property and emit the errorChanged signal.

Note: The corresponding handler is onLoadErrorChanged.

See also Loadable and Object.


loadSettingsChanged()

Emitted when the loadSettings property changes.

Note: The corresponding handler is onLoadSettingsChanged.

This signal was introduced in Esri.ArcGISRuntime 100.2.


loadStatusChanged()

Emitted when the loadStatus property of this Scene changes.

Note: The corresponding handler is onLoadStatusChanged.

See also Loadable.


operationalLayersChanged()

Emitted when the operationalLayers property of this Scene changes.

This property may be populated after the scene loads.

Note: The corresponding handler is onOperationalLayersChanged.


sceneViewTilingSchemeChanged()

Emitted when the sceneViewTilingScheme property changes.

Note: The corresponding handler is onSceneViewTilingSchemeChanged.

This signal was introduced in Esri.ArcGISRuntime 100.2.


spatialReferenceChanged()

Emitted when the spatialReference property changes.

Note: The corresponding handler is onSpatialReferenceChanged.


tablesChanged()

Emitted when the tables property of this Scene changes.

This property may be populated after the scene loads.

Note: The corresponding handler is onTablesChanged.

This signal was introduced in Esri.ArcGISRuntime 100.3.


transportationNetworksChanged()

Emitted when the transportationNetworks property of this Scene changes.

Note: The corresponding handler is onTransportationNetworksChanged.

This signal was introduced in Esri.ArcGISRuntime 100.7.


versionChanged()

Emitted when the version property of this Scene changes.

This property may be populated after the scene loads.

Note: The corresponding handler is onVersionChanged.

This signal was introduced in Esri.ArcGISRuntime 100.3.


Method Documentation

void cancelLoad()

See also Loadable.


void load()

See also Loadable.


void retryLoad()

See also Loadable.



Feedback on this topic?