Analyze viewshed

This sample demonstrates how to use GeoprocessingTask to calculate a viewshed using a geoprocessing service. Click any point on the map to see all areas that are visible within a 1 kilometer radius. It may take a few seconds for the model to run and send back the results.

Analyze viewshed result

Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage 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"
             xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime" 
             x:Class="ArcGISRuntimeXamarin.Samples.AnalyzeViewshed.AnalyzeViewshed">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <StackLayout Orientation="Vertical">
      <StackLayout Orientation="Horizontal">
        <Label Margin="10,0,0,0">Click a location on the map to perform the viewshed analysis.</Label>
      </StackLayout>
    </StackLayout>
    <ActivityIndicator x:Name="MyActivityIndicator" IsVisible="False"/>
    <esriUI:MapView x:Name="MyMapView" Grid.Row="1"/>
  </Grid>
</ContentPage>


In this topic
  1. Code