Analyze hotspots

This sample demonstrates how to execute the GeoprocessingTask asynchronously to calculate a hotspot analysis based on the frequency of 911 calls. It calculates the frequency of these calls within a given study area during a specified constrained time period set between 1/1/1998 and 5/31/1998.

Analyze hotspots result

Instructions

To run the hotspot analysis, select a data range and click on the 'Run analysis' button. Note the larger the date range, the longer it may take for the task to run and send back the results.

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.AnalyzeHotspots.AnalyzeHotspots">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <StackLayout Orientation="Vertical">
      <StackLayout Orientation="Horizontal">
        <Label Margin="10,0,0,0">Start Date:</Label>
        <Entry Text="1/01/98" x:Name="StartDate"/>
      </StackLayout>
      <StackLayout Orientation="Horizontal">
      <Label Margin="10,0,0,0">EndDate:</Label>
        <Entry Text="1/31/98" x:Name="EndDate"/>
      </StackLayout>
      <Button Text="Run Analysis" Clicked="OnRunAnalysisClicked"/>       
    </StackLayout>
    <ActivityIndicator x:Name="MyActivityIndicator" IsVisible="False"/>
    <esriUI:MapView x:Name="MyMapView" Grid.Row="1"/>
  </Grid>
</ContentPage>


In this topic
  1. Instructions
  2. Code