A viewshed shows the visible and obstructed areas from an observer's vantage point. This sample demonstrates how to attach a viewshed to a moving GeoElement.
How it works
To attach a viewshed to an AGSGeoElement:
- Create an AGSGraphic and add it to an AGSGraphicsOverlay.
- Use an AGSSimpleRenderer in the AGSGraphicsOverlay which has a heading expression set. This way you can relate the viewshed's heading to the AGSGeoElement's heading.
- Create an AGSGeoElementViewshed with the graphic, heading/pitch offsets, and min/max distance.
- To offset the viewshed's observer location from the center of the graphic, set viewshed.offsetX, etc.