Class ArcGISSceneLayer
- java.lang.Object
- 
- com.esri.arcgisruntime.layers.Layer
- 
- com.esri.arcgisruntime.layers.ArcGISSceneLayer
 
 
- 
- All Implemented Interfaces:
- ApiKeyResource,- RemoteResource,- LayerContent,- Loadable,- FloorAware
 
 public final class ArcGISSceneLayer extends Layer implements FloorAware, RemoteResource, ApiKeyResource 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) 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 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 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 for more information.
 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. More information and reference samples on the ArcGIS developer website - Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
- See Also:
- ArcGISScene,- Layer,- SceneView
 
- 
- 
Constructor SummaryConstructors Constructor Description ArcGISSceneLayer(PortalItem portalItem)Creates an ArcGISSceneLayer instance based on aPortalItem.ArcGISSceneLayer(String dataSourceUri)Creates a Layer from an ArcGIS scene service at the given URL or absolute file path to local scene package file.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearSelection()Clears all the selected features.ArcGISSceneLayercopy()Creates a deep copy of this ArcGISSceneLayer instance.doublegetAltitudeOffset()Gets the layer altitude offset.StringgetApiKey()Gets the API key to access API key enabled services and resources in ArcGIS Online.CredentialgetCredential()Gets the credential used to authenticate the user with the scene service.FeatureTablegetFeatureTable()Gets the feature table associated with this layer.LayerFloorDefinitiongetFloorDefinition()Gets the floor definition that defines the properties that allow a layer to be floor-aware.RequestConfigurationgetRequestConfiguration()Gets the RequestConfiguration object that contains parameters used when making a request by this Layer.ListenableFuture<FeatureQueryResult>getSelectedFeaturesAsync()Gets all the selected features.LayerSceneProperties.SurfacePlacementgetSurfacePlacement()Gets the surface placement for the ArcGISSceneLayer.StringgetUri()Gets the URI of thisRemoteResource.booleanisLabelsEnabled()True if labels should be displayed.voidselectFeature(Feature feature)Selects the given feature and adds it to the current list of selected features.voidselectFeatures(Iterable<Feature> features)Selects the features in the list and adds them to the current list of selected features.voidsetAltitudeOffset(double altitudeOffset)Sets the layer altitude offset.voidsetApiKey(String apiKey)Sets the API key to access API key enabled services and resources in ArcGIS Online.voidsetCredential(Credential credential)Sets the credential used to authenticate the user with the scene service.voidsetFloorDefinition(LayerFloorDefinition floorDefinition)Sets the floor definition that defines the properties that allow a layer to be floor-aware.voidsetLabelsEnabled(boolean labelsEnabled)True if labels should be displayed.voidsetRequestConfiguration(RequestConfiguration requestConfiguration)Sets the configuration parameters used for sending a network request using this Layer object.voidsetSurfacePlacement(LayerSceneProperties.SurfacePlacement surfacePlacement)Sets the surface placement for the ArcGISSceneLayer.voidunselectFeature(Feature feature)Removes a feature from selection.voidunselectFeatures(Iterable<Feature> features)Removes multiple features from selection.- 
Methods inherited from class com.esri.arcgisruntime.layers.LayeraddDoneLoadingListener, addLoadStatusChangedListener, addVisibilityChangedListener, cancelLoad, canChangeVisibility, canShowInLegend, fetchLegendInfosAsync, getAttribution, getDescription, getFullExtent, getId, getItem, getLoadError, getLoadStatus, getMaxScale, getMinScale, getName, getOpacity, getSpatialReference, getSubLayerContents, isIdentifyEnabled, isVisible, isVisibleAtScale, loadAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
 
- 
 
- 
- 
- 
Constructor Detail- 
ArcGISSceneLayerpublic ArcGISSceneLayer(String dataSourceUri) Creates a Layer from an ArcGIS scene service at the given URL or absolute file path to local scene package file.Scene services allow for sharing of 3D features from a scene server. To use a credential, call setCredential(Credential)after this constructor and before loading or using this layer.- Parameters:
- dataSourceUri- the url of the scene service, or the path to local scene package (.slpk)
- Throws:
- IllegalArgumentException- if dataSourceUri is null or empty
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
 
 - 
ArcGISSceneLayerpublic ArcGISSceneLayer(PortalItem portalItem) Creates an ArcGISSceneLayer instance based on aPortalItem.If the portal item is not in LoadStatus.LOADEDstate it will be loaded automatically when this ArcGISSceneLayer instance is loaded.If the loaded portalItem is not of type PortalItem.Type.SCENE_SERVICEthe layer will fail to load.- Parameters:
- portalItem- PortalItem from which this ArcGISSceneLayer will be created
- Throws:
- IllegalArgumentException- if the portalItem is null
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
 
 
- 
 - 
Method Detail- 
selectFeaturepublic void selectFeature(Feature feature) Selects the given feature and adds it to the current list of selected features.- Parameters:
- feature- the feature to be added to selection
- Throws:
- IllegalArgumentException- if feature is null
- Since:
- 100.3.0
 
 - 
selectFeaturespublic void selectFeatures(Iterable<Feature> features) Selects the features in the list and adds them to the current list of selected features.- Parameters:
- features- the features to be added to selection
- Throws:
- IllegalArgumentException- if features is null
- Since:
- 100.3.0
 
 - 
getSelectedFeaturesAsyncpublic ListenableFuture<FeatureQueryResult> getSelectedFeaturesAsync() Gets all the selected features.- Returns:
- a future that represents the selected features
- Since:
- 100.3.0
 
 - 
unselectFeaturepublic void unselectFeature(Feature feature) Removes a feature from selection.- Parameters:
- feature- the feature to be unselected
- Throws:
- IllegalArgumentException- if feature is null
- Since:
- 100.3.0
 
 - 
unselectFeaturespublic void unselectFeatures(Iterable<Feature> features) Removes multiple features from selection.- Parameters:
- features- the features to be unselected
- Throws:
- IllegalArgumentException- if features is null
- Since:
- 100.3.0
 
 - 
clearSelectionpublic void clearSelection() Clears all the selected features.- Since:
- 100.3.0
 
 - 
copypublic ArcGISSceneLayer copy() Creates a deep copy of this ArcGISSceneLayer instance.- Returns:
- a deep copy of this ArcGISSceneLayer instance, which means that copies of all fields of this layer are made including its loading state
- Since:
- 100.1.0
 
 - 
getFeatureTablepublic FeatureTable getFeatureTable() Gets the feature table associated with this layer.- Returns:
- the feature table, or null if there is no associated feature table
- Since:
- 100.3.0
 
 - 
isLabelsEnabledpublic boolean isLabelsEnabled() True if labels should be displayed.Note that this property is only supported for scene layer of type point objects. - Returns:
- true if labels should be displayed
- Since:
- 100.14.0
 
 - 
setLabelsEnabledpublic void setLabelsEnabled(boolean labelsEnabled) True if labels should be displayed.Note that this property is only supported for scene layer of type point objects. - Parameters:
- labelsEnabled- true if labels should be displayed
- Since:
- 100.14.0
 
 - 
setSurfacePlacementpublic void setSurfacePlacement(LayerSceneProperties.SurfacePlacement surfacePlacement) Sets the surface placement for the ArcGISSceneLayer.- Parameters:
- surfacePlacement- the surface placement to apply to the scene layer
- Throws:
- IllegalArgumentException- if surfacePlacement is null
- Since:
- 100.6.0
 
 - 
getSurfacePlacementpublic LayerSceneProperties.SurfacePlacement getSurfacePlacement() Gets the surface placement for the ArcGISSceneLayer.- Returns:
- the surface placement of the scene layer
- Since:
- 100.6.0
 
 - 
setAltitudeOffsetpublic void setAltitudeOffset(double altitudeOffset) Sets the layer altitude offset.- Parameters:
- altitudeOffset- the layer altitude offset
- Since:
- 100.6.0
 
 - 
getAltitudeOffsetpublic double getAltitudeOffset() Gets the layer altitude offset.- Returns:
- the layer altitude offset
- Since:
- 100.6.0
 
 - 
getCredentialpublic Credential getCredential() Gets the credential used to authenticate the user with the scene service.- Specified by:
- getCredentialin interface- RemoteResource
- Returns:
- the credential used for authentication
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
 
 - 
setCredentialpublic void setCredential(Credential credential) Sets the credential used to authenticate the user with the scene service.- Specified by:
- setCredentialin interface- RemoteResource
- Parameters:
- credential- the credential used for authentication
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
 
 - 
getRequestConfigurationpublic RequestConfiguration getRequestConfiguration() Gets the RequestConfiguration object that contains parameters used when making a request by this Layer.- Specified by:
- getRequestConfigurationin interface- RemoteResource
- Returns:
- the RequestConfiguration object or default values if nothing was set
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
- See Also:
- setRequestConfiguration(com.esri.arcgisruntime.io.RequestConfiguration)
 
 - 
setRequestConfigurationpublic void setRequestConfiguration(RequestConfiguration requestConfiguration) Sets the configuration parameters used for sending a network request using this Layer object. The global RequestConfiguration is used if no RequestConfiguration is set which contains the default values from the getter/setter methods.- Specified by:
- setRequestConfigurationin interface- RemoteResource
- Parameters:
- requestConfiguration- contains the parameters to use
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
- See Also:
- RequestConfiguration
 
 - 
getUripublic String getUri() Description copied from interface:RemoteResourceGets the URI of thisRemoteResource. Typically this is the URI used to instantiate the object.- Specified by:
- getUriin interface- RemoteResource
- Returns:
- the URI of this RemoteResource
 
 - 
getApiKeypublic String getApiKey() Description copied from interface:ApiKeyResourceGets the API key to access API key enabled services and resources in ArcGIS Online.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. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account. In addition to setting an API key at a global level for your application using ArcGISRuntimeEnvironment.setApiKey(String), you can callApiKeyResource.setApiKey(String)on any ArcGIS Runtime class that implementsApiKeyResource. When you callsetApiKey(String)on anAPIKeyResource, it will override the default key at the global level (the key returned byArcGISRuntimeEnvironment.getApiKey(), in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.Classes that expose an API key property by implementing APIKeyResource include: - Specified by:
- getApiKeyin interface- ApiKeyResource
- Returns:
- the API key to access API key enabled services and resources in ArcGIS Online
- See Also:
- ApiKeyResource.setApiKey(String)
 
 - 
setApiKeypublic void setApiKey(String apiKey) Description copied from interface:ApiKeyResourceSets the API key to access API key enabled services and resources in ArcGIS Online.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. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account. In addition to setting an API key at a global level for your application using ArcGISRuntimeEnvironment.setApiKey(String), you can callsetApiKey(String)on any ArcGIS Runtime class that implementsApiKeyResource. When you callsetApiKey(String)on anAPIKeyResource, it will override the default key at the global level (the key returned byArcGISRuntimeEnvironment.getApiKey(), in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app.Classes that expose an API key property by implementing APIKeyResource include: - Specified by:
- setApiKeyin interface- ApiKeyResource
- Parameters:
- apiKey- the API key to access API key enabled services and resources in ArcGIS Online
- See Also:
- ApiKeyResource.getApiKey()
 
 - 
getFloorDefinitionpublic LayerFloorDefinition getFloorDefinition() Description copied from interface:FloorAwareGets the floor definition that 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.- Specified by:
- getFloorDefinitionin interface- FloorAware
- Returns:
- the floor definition that defines the properties that allow a layer to be floor-aware, or null if none
 
 - 
setFloorDefinitionpublic void setFloorDefinition(LayerFloorDefinition floorDefinition) Description copied from interface:FloorAwareSets the floor definition that 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.- Specified by:
- setFloorDefinitionin interface- FloorAware
- Parameters:
- floorDefinition- the floor definition that defines the properties that allow a layer to be floor-aware
 
 
- 
 
-