Identify features in a scene to select.

Use case
You can select features to visually distinguish them with a selection color or highlighting. This can be useful to demonstrate the physical extent or associated attributes of a feature, or to initiate another action such as centering that feature in the scene view.
How to use the sample
Tap on a building in the scene layer to select it. Deselect buildings by tapping away from the buildings.
How it works
- Create an instance of
ArcGISSceneLayer, passing in the URL to a scene layer service. - Use the
onSingleTapGestureon theSceneViewto get the screen tapped location. - Use
SceneViewProxy.identify(layer:screenPoint:tolerance:maximumResults:)to identify features in the scene. - From the resulting
IdentifyLayerResult, get the list of identifiedGeoElements. - Get the first
Featurein the list and useArcGISSceneLayer.selectFeature(features:).
Relevant API
- ArcGISSceneLayer
- Scene
- SceneView
- SceneViewProxy
- SceneViewReader
About the data
This sample shows a Brest France Buildings Scene hosted on ArcGIS Online.
Tags
3D, buildings, identify, model, query, search, select