ArcGISSceneLayer

class ArcGISSceneLayer : Layer, ApiKeyResource, FloorAware

A layer to visualize an ArcGIS scene service. Scene layers display content from a scene service or a scene package.

The ArcGISSceneLayer is a layer type optimized for displaying large amounts of data in a SceneView. The ArcGISSceneLayer class displays data published as scene services, scene layer packages (.slpk), and scene layers in mobile scene packages (.mspk).

ArcGISSceneLayer supports:

  • 3D Object (e.g. buildings)

  • Integrated mesh (e.g. buildings, trees, and elevation) (see IntegratedMeshLayer)

  • Point features (e.g. trees)

The scene layer complies with the Indexed 3D Scene layer (I3S)[https://github.com/esri/i3s-spec] format. The I3S format is an open 3D content delivery format used to disseminate 3D GIS data to mobile, web, and desktop clients.

Functional characteristics

  • 3D object — 3D object scene layers contain objects explicitly modeled in three dimensions and are used to represent objects such as buildings. These features have attributes and can be identified. See the 3D Object Scene Layer[https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/the-3d-objects-scene-layer-in-arcgis-pro.htm] for more information.

  • Integrated mesh — 3D mesh data is typically captured by an automated process for constructing 3D objects out of large sets of overlapping imagery. The result integrates the original input image information as a textured mesh including 3D objects, such as buildings and trees, and elevation information. Integrated mesh scene layers are often created for citywide 3D mapping. They can represent something as small as a single building or as large as a city or state. They are often assembled automatically from imagery collected by a drone; they cannot be restyled because there is no underlying feature data. See the Integrated Mesh Scene Layer[https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/the-integrated-mesh-scene-layer-in-arcgis-pro.htm] for more information.

  • Point features — To ensure fast visualization, cached scene layers are used to display large amounts of 3D point data about individual features, such as all the trees in a city. Point scene layers have features that can be identified and that have attributes that may be cached or available from an associated feature layer. The display of point scene layers is automatically thinned to improve performance and visibility at smaller scales and longer distances. Automatic thinning means that not all features are displayed at small scales; as you zoom in, additional features are displayed. See the Point scene layer[https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/the-point-scene-layer-in-arcgis-pro.htm] for more information.

Point scene layers are generated from point feature layers. Point scene layers can be generated by ArcGIS Pro and hosted as a scene service or scene layer package.

Note: When publishing a scene from ArcGIS Pro (sharing as a web scene) any point feature layers in the 3D Layers section of the contents pane will be published as a scene service. The scene service will be referenced within the web scene.

Performance characteristics For a scene layer, the rendering of 3D data is based on the current level of detail (LOD), which is determined by the distance from the camera. Each object in a 3D object service is represented differently at various LODs determined by the camera distance. As the camera distance changes in the scene, objects will be displayed appropriately for the current LOD. This results in good client performance and low memory usage, at the expense of frequently loading and unloading objects.

See also

Constructors

Link copied to clipboard
fun ArcGISSceneLayer(item: Item)

Creates scene layer object with a portal item.

Link copied to clipboard
fun ArcGISSceneLayer(uri: String)

Creates a Scene layer object. If the specified URI is a portal item URL (see PortalItem.PortalItem(String) for the supported URL formats), the underlying PortalItem will be created and accessible through Layer.getItem().

Functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
fun clearSelection()

Clears all selected features.

Link copied to clipboard
open override fun clone(): ArcGISSceneLayer

Clones the ArcGISSceneLayer.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open suspend override fun fetchLegendInfos(): Result<List<LegendInfo>>

Fetches the list of legend info.

Link copied to clipboard
suspend fun getSelectedFeatures(): Result<FeatureQueryResult>

Returns a list of the currently selected features.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isVisibleAtScale(scale: Double): Boolean

Returns the layer content's effective visibility at the specified scale. Returns the effective layer content visibility. This effective visibility takes care of the effective visibility of the parents at the specified scale. Will return false if an error occurs.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.

Link copied to clipboard
fun selectFeature(feature: Feature)

Selects the given feature and adds it to the current list of selected features.

Link copied to clipboard
fun selectFeatures(features: Iterable<Feature>)

Selects the features in the list and adds them to the current list of selected features.

Link copied to clipboard
fun unselectFeature(feature: Feature)

Unselects the given feature and removes it from the current list of selected features.

Link copied to clipboard
fun unselectFeatures(features: Iterable<Feature>)

Unselects the features in the given list and removes them from the current list of selected features.

Properties

Link copied to clipboard
var altitudeOffset: Double

The layer altitude offset.

Link copied to clipboard
open override var apiKey: ApiKey?

An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services.

Link copied to clipboard
val attribution: String

The attribution text for the layer.

Link copied to clipboard
open override val canChangeVisibility: Boolean

A flag indicating whether the layer content's visibility can be changed. A flag indicating whether the layer content visibility can be changed. Will return false if an error occurs.

Link copied to clipboard
val dataType: SceneLayerDataType

The content type of a ArcGIS scene layer. The type of a scene layer can only be established once the layer has loaded. It can be used to identify the content type contained within the ArcGIS Scene layer.

Link copied to clipboard
var description: String

The description for the layer. The description of the layer.

Link copied to clipboard
val featureTable: FeatureTable?
Link copied to clipboard
open override var floorDefinition: LayerFloorDefinition?

Defines the properties that allow a layer to be floor-aware. When a layer is configured as floor-aware, it has a FloorAware.getFloorDefinition() property that defines properties that allow a layer to be floor-aware. When it is null (default value) the specific layer does not support floor filtering.

Link copied to clipboard
val fullExtent: Envelope?
Link copied to clipboard
var id: String

The unique identifying string for the layer, for example specified in a map or scene. The id is used by other parts of this API to refer to a specific Layer, such as in a set of FeatureFenceParameters or a FacilityLayerDefinition. If not supplied, all layers will be assigned a unique id when created.

Link copied to clipboard
val isIdentifyEnabled: Boolean

Whether the layer supports identify. If the layer is not loaded it may return false if identify support is determined by metadata that is not yet available.

Link copied to clipboard
open override var isVisible: Boolean

The layer content's visibility. The layer content visibility. Will return false if an error occurs.

Link copied to clipboard
val item: Item?
Link copied to clipboard
var labelsEnabled: Boolean

True if labels should be displayed. Note that this property is only supported for SceneLayerDataType.Point layers.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Link copied to clipboard
var maxScale: Double?

The maximum scale for the layer. If it is null, there is no maximum. This controls the maximum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard
var minScale: Double?

The minimum scale for the layer. If it is null, there is no minimum. This controls the minimum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard
open override val name: String

The layer content's name. The layer content name.

Link copied to clipboard
var opacity: Float

The opacity for the layer. All of the connected map views will be updated.

Link copied to clipboard
open override var showInLegend: Boolean

A flag indicating whether the layer content participates in the legend. A flag indicating whether the layer content is shown in the legend.

Link copied to clipboard
val spatialReference: SpatialReference?
Link copied to clipboard
open override val subLayerContents: StateFlow<List<LayerContent>>

The sub layer contents of a layer content.

Link copied to clipboard
var surfacePlacement: SurfacePlacement

The surface placement form the Scene layer.

Link copied to clipboard
val uri: String?

The URI of the ArcGIS scene layer. This method can't be called once the layer is loading else ErrorType.CommonIllegalState exception will occur.

Link copied to clipboard
val visibilityChanged: SharedFlow<Boolean>

Callback invoked when the visibility of the layer changes.