Identify GeoElements in a scene layer.
Click on a building in the scene layer to select it. Deselect buildings by clicking away from the buildings.
- Create an
ArcGISSceneLayer
passing in the URL to a scene layer service. - Use
sceneView.setOnTouchListener
to get the screen tap locationscreenPoint
. - Call
sceneView.identifyLayersAsync(sceneLayer, screenPoint, tolerance, false, 1)
to identify features in the scene. - From the resulting
IdentifyLayerResult
, get the list of identifiedGeoElements
withresult.getElements()
. - Get the first element in the list, checking that it is a feature, and call
sceneLayer.selectFeature(feature)
to select it.
This sample shows a Berlin building layer from ArcGIS Online.
Scene
ArcGISSceneLayer
SceneView
Search and Query, Buildings, scene, model, 3D