Scene QML Type

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

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

GeoModel

Properties

Signals

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 geographic 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, basemap, and GeoModel::initBasemapStyle 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, item, and initBasemapStyle 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

    Component.onCompleted: {
        // Set the focus on SceneView to initially enable keyboard navigation
        forceActiveFocus();

        // set viewpoint to the specified camera
        setViewpointCameraAndWait(camera);
    }

    // create a scene...scene is a default property of sceneview
    // and thus will get added to the sceneview
    Scene {
        // add a basemap
        Basemap {
            initStyle: Enums.BasemapStyleArcGISImagery
        }

        // 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"
            }
        }
    }
}

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.


error : Error

Returns the error object (read-only).

See also Loadable and Error.


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.


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 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.


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.


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.


sceneViewTilingSchemeChanged()

Emitted when the sceneViewTilingScheme property changes.

Note: The corresponding handler is onSceneViewTilingSchemeChanged.

This signal was introduced in Esri.ArcGISRuntime 100.2.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.