Line of sight (location)
Perform a line of sight analysis between two points in real time.
A line of sight analysis can be used to assess whether a view is obstructed between an observer and a target. Obstructing features could either be natural, like topography, or man-made, like buildings. Consider an events planning company wanting to commemorate a national event by lighting sequential beacons across hill summits or roof tops. To guarantee a successful event, ensuring an unobstructed line of sight between neighboring beacons would allow each beacon to be activated as intended.
Tap to place the starting point for the line. Tap again to place the end point.
- Create an
AnalysisOverlayand add it to the scene view.
- Create a
LocationLineOfSightwith initial observer and target locations and add it to the analysis overlay.
- Listen for taps on the scene view.
- Update the target location with
lineOfSight.TargetLocation = scenePoint.
3D, line of sight, visibility, visibility analysis
<?xml version="1.0" encoding="utf-8" ?> <ContentPage x:Class="ArcGISRuntime.Samples.LineOfSightLocation.LineOfSightLocation" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"> <Grid> <esriUI:SceneView x:Name="MySceneView" /> </Grid> </ContentPage>