- All Implemented Interfaces:
ApiKeyResource
,RemoteResource
,LayerContent
,Loadable
,FloorAware
Scene layers display content from a scene service or a scene package.
ArcGISSceneLayer optimized to displaying large amounts of data in a SceneView
. It can display
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. It 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.
- Since:
- 100.0.0
- See Also:
-
Property Summary
TypePropertyDescriptionA filter applied to a feature-based ArcGISSceneLayer to include or exclude features within the polygons.Properties inherited from class com.esri.arcgisruntime.layers.Layer
loadError, loadStatus
-
Constructor Summary
ConstructorDescriptionArcGISSceneLayer
(PortalItem portalItem) Creates an ArcGIS scene layer from aPortalItem
representing an ArcGIS scene service.ArcGISSceneLayer
(String dataSourceUri) Creates an ArcGIS scene layer from the specified URI. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all the selected features.copy()
Creates a deep copy of this ArcGISSceneLayer instance.double
Gets the layer altitude offset.Gets the API key to access API key enabled services and resources in ArcGIS Online.Gets the credential used to authenticate the user with the scene service.Gets the feature table associated with this layer.Gets the floor definition that defines the properties that allow a layer to be floor-aware.Gets the value of thepolygonFilter
property.Gets the RequestConfiguration object that contains parameters used when making a request by this Layer.Returns a future that represents a collection of the currently selected features.Gets the surface placement specifies how the layer's data should be placed in relation to the scene's surface.getUri()
The URL of an ArcGIS scene service or the path to a local scene layer package (.slpk) file.boolean
True if labels should be displayed, false otherwise.A filter applied to a feature-based ArcGISSceneLayer to include or exclude features within the polygons.void
Reset the visibility of all features back to their original state.void
selectFeature
(Feature feature) Selects the given feature and adds it to the current list of selected features.void
selectFeatures
(Iterable<Feature> features) Selects the features in the collection and adds them to the current collection of selected features.void
setAltitudeOffset
(double altitudeOffset) Sets the layer altitude offset.void
Sets the API key to access API key enabled services and resources in ArcGIS Online.void
setCredential
(Credential credential) Sets the credential used to authenticate the user with the scene service.void
setFeaturesVisible
(Iterable<Feature> features, boolean visible) Sets the visibility of all features in the collection.void
setFeatureVisible
(Feature feature, boolean visible) Sets the visibility of the given feature.void
setFloorDefinition
(LayerFloorDefinition floorDefinition) Sets the floor definition that defines the properties that allow a layer to be floor-aware.void
setLabelsEnabled
(boolean labelsEnabled) True if labels should be displayed.void
setPolygonFilter
(SceneLayerPolygonFilter polygonFilter) Sets the value of thepolygonFilter
property.void
setRequestConfiguration
(RequestConfiguration requestConfiguration) Sets the configuration parameters used for sending a network request using this Layer object.void
setSurfacePlacement
(LayerSceneProperties.SurfacePlacement surfacePlacement) Sets the surface placement which specifies how the layer's data should be placed in relation to the scene's surface.void
unselectFeature
(Feature feature) Unselects the given feature and removes it from the current collection of selected features.void
unselectFeatures
(Iterable<Feature> features) Unselects the features in the given collection and removes them from the current collection of selected features.Methods inherited from class com.esri.arcgisruntime.layers.Layer
addDoneLoadingListener, addLoadStatusChangedListener, addVisibilityChangedListener, cancelLoad, canChangeVisibility, canShowInLegend, fetchLegendInfosAsync, getAttribution, getDescription, getFullExtent, getId, getItem, getLoadError, getLoadStatus, getMaxScale, getMinScale, getName, getOpacity, getSpatialReference, getSubLayerContents, isIdentifyEnabled, isVisible, isVisibleAtScale, loadAsync, loadErrorProperty, loadStatusProperty, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
Property Details
-
polygonFilter
A filter applied to a feature-based ArcGISSceneLayer to include or exclude features within the polygons.- Since:
- 200.2.0
- See Also:
-
-
Constructor Details
-
ArcGISSceneLayer
Creates an ArcGIS scene layer from the specified URI.If the specified URI is a portal item URL, the item's type should be
PortalItem.Type.SCENE_SERVICE
. The underlyingPortalItem
can be accessed throughLayer.getItem()
.- Parameters:
dataSourceUri
- the URL of an ArcGIS scene service, an ArcGIS scene service portal item, or a scene layer package (.slpk) file.- Throws:
IllegalArgumentException
- if dataSourceUri is null or empty- Since:
- 100.0.0
-
ArcGISSceneLayer
Creates an ArcGIS scene layer from aPortalItem
representing an ArcGIS scene service.The item's type should be
PortalItem.Type.SCENE_SERVICE
.- Parameters:
portalItem
- a portal item of typePortalItem.Type.SCENE_SERVICE
.- Throws:
IllegalArgumentException
- if the portalItem is null- Since:
- 100.0.0
-
-
Method Details
-
selectFeature
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
-
selectFeatures
Selects the features in the collection and adds them to the current collection of selected features.- Parameters:
features
- the features to be added to selection- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.3.0
-
getSelectedFeaturesAsync
Returns a future that represents a collection of the currently selected features.- Returns:
- a future that represents the selected features
- Since:
- 100.3.0
-
unselectFeature
Unselects the given feature and removes it from the current collection of selected features.- Parameters:
feature
- the feature to be unselected- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.3.0
-
unselectFeatures
Unselects the features in the given collection and removes them from the current collection of selected features.- Parameters:
features
- the features to be unselected- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.3.0
-
clearSelection
public void clearSelection()Clears all the selected features.- Since:
- 100.3.0
-
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
-
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
-
isLabelsEnabled
public boolean isLabelsEnabled()True if labels should be displayed, false otherwise.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
-
setLabelsEnabled
public 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
-
polygonFilterProperty
A filter applied to a feature-based ArcGISSceneLayer to include or exclude features within the polygons.- Returns:
- the
polygonFilter
property - Since:
- 200.2.0
- See Also:
-
getPolygonFilter
Gets the value of thepolygonFilter
property.- Property description:
- A filter applied to a feature-based ArcGISSceneLayer to include or exclude features within the polygons.
- Returns:
- the value of the
polygonFilter
property - Since:
- 200.2.0
- See Also:
-
setPolygonFilter
Sets the value of thepolygonFilter
property.- Property description:
- A filter applied to a feature-based ArcGISSceneLayer to include or exclude features within the polygons.
- Parameters:
polygonFilter
- the value for thepolygonFilter
property- Since:
- 200.2.0
- See Also:
-
setSurfacePlacement
Sets the surface placement which specifies how the layer's data should be placed in relation to the scene's surface.- Parameters:
surfacePlacement
- the surface placement to apply to the scene layer- Throws:
IllegalArgumentException
- if surfacePlacement is null- Since:
- 100.6.0
-
getSurfacePlacement
Gets the surface placement specifies how the layer's data should be placed in relation to the scene's surface.- Returns:
- the surface placement of the scene layer
- Since:
- 100.6.0
-
setAltitudeOffset
public void setAltitudeOffset(double altitudeOffset) Sets the layer altitude offset.This raises or lowers all features in the scene layer by the given offset.
- Parameters:
altitudeOffset
- the layer altitude offset- Since:
- 100.6.0
-
getAltitudeOffset
public double getAltitudeOffset()Gets the layer altitude offset.This raises or lowers all features in the scene layer by the given offset.
- Returns:
- the layer altitude offset
- Since:
- 100.6.0
-
getCredential
Gets the credential used to authenticate the user with the scene service.- Specified by:
getCredential
in interfaceRemoteResource
- Returns:
- the credential used for authentication
- Since:
- 100.0.0
-
setCredential
Sets the credential used to authenticate the user with the scene service.- Specified by:
setCredential
in interfaceRemoteResource
- Parameters:
credential
- the credential used for authentication- Since:
- 100.0.0
-
getRequestConfiguration
Gets the RequestConfiguration object that contains parameters used when making a request by this Layer.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the RequestConfiguration object or default values if nothing was set
- Since:
- 100.0.0
- See Also:
-
setRequestConfiguration
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:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- contains the parameters to use- Since:
- 100.0.0
- See Also:
-
getUri
The URL of an ArcGIS scene service or the path to a local scene layer package (.slpk) file.The URI is available after the layer has successfully loaded.
- Specified by:
getUri
in interfaceRemoteResource
- Returns:
- the URI of this RemoteResource
- Since:
- 100.0.0
- See Also:
-
getApiKey
Description copied from interface:ApiKeyResource
Gets the API key to access API key enabled services and resources in ArcGIS Online.An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the Generate API keys privilege. To learn how to create and manage API keys, go to the Create an API Key tutorial. You must ensure that your API key has the correct privileges to access secure resources.
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 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:
getApiKey
in interfaceApiKeyResource
- Returns:
- the API key to access API key enabled services and resources in ArcGIS Online
- See Also:
-
setApiKey
Description copied from interface:ApiKeyResource
Sets 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 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:
setApiKey
in interfaceApiKeyResource
- Parameters:
apiKey
- the API key to access API key enabled services and resources in ArcGIS Online- See Also:
-
getFloorDefinition
Description copied from interface:FloorAware
Gets 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:
getFloorDefinition
in interfaceFloorAware
- Returns:
- the floor definition that defines the properties that allow a layer to be floor-aware, or null if none
-
setFloorDefinition
Description copied from interface:FloorAware
Sets 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:
setFloorDefinition
in interfaceFloorAware
- Parameters:
floorDefinition
- the floor definition that defines the properties that allow a layer to be floor-aware
-
setFeatureVisible
Sets the visibility of the given feature.- Parameters:
feature
- the featurevisible
- true to show the feature, otherwise false- Throws:
NullPointerException
- if feature is null- Since:
- 200.2.0
-
setFeaturesVisible
Sets the visibility of all features in the collection.- Parameters:
features
- anIterable
ofFeature
. Contents of theIterable
are copied.visible
- true to show the features, otherwise false- Throws:
NullPointerException
- if features is nullIllegalArgumentException
- if features is empty- Since:
- 200.2.0
-
resetFeaturesVisible
public void resetFeaturesVisible()Reset the visibility of all features back to their original state.- Since:
- 200.2.0
-