Line of Sight (GeoElement)

This sample demonstrates how to perform a dynamic line of sight analysis between two moving GeoElement objects.

Line of sight analysis from a geo element

Instructions

Use the slider to adjust the height of the observer.

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.LineOfSightGeoElement.LineOfSightGeoElement"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <Grid>
        <esriUI:SceneView x:Name="MySceneView" />
        <Border BorderBrush="Black" BorderThickness="1" Background="White"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <StackPanel>
                <TextBlock Text="Use the slider to change the observer's altitude."
                           TextAlignment="Center" FontWeight="SemiBold" TextWrapping="Wrap" />
                <TextBlock x:Name="StatusLabel"
                           Text="Status: "
                           Margin="0,10,0,5"
                           TextAlignment="Center" Foreground="MidnightBlue" />
                <Slider HorizontalAlignment="Stretch"
                        Margin="0,0,0,-10"
                        ValueChanged="HeightSlider_ValueChanged" />
            </StackPanel>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Instructions
  2. Code