Create a viewshed using the current camera viewpoint.
A viewshed shows the visible and obstructed areas from an observer's vantage point.
The sample will start with a viewshed created from the initial camera location, so only the visible (green) portion of the viewshed will be visible. Move around the scene to see the obstructed (red) portion. Click the Update from Camera button to update the viewshed to the current camera position.
To create and update a viewshed from a camera:
- Get a
Camera
either by creating it, or by getting the current camera from the scene withsceneView.getCurrentViewpointCamera()
. - Create a
LocationViewshed
passing in theCamera
plus a min/max distance. - To update the viewshed with a new camera, use
viewshed.updateFromCamera(camera)
- 3D
- AnalysisOverlay
- ArcGISTiledElevationSource
- ArcGISScene
- ArcGISSceneLayer
- Camera
- LocationViewshed
- SceneView