ArcGIS Runtime SDK for .NET Samples

Buffer list

Planar and geodesic buffers

Loading

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"
             x:Class="ArcGISRuntime.Samples.BufferList.BufferList">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0"
              HorizontalOptions="Center"
              WidthRequest="320"
              Margin="10,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="105"/>
                <RowDefinition Height="40" />
                <RowDefinition Height="40" />
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Label x:Name="BufferInstructionsLabel"
                   Grid.Row="0"
                   FontSize="Micro"
                   Text="Tap the map to add points. Each point uses the buffer distance entered when it was created. The envelope shows the area where you can expect reasonable results for planar buffers with this map's spatial reference.">
            </Label>
            <StackLayout Grid.Row="1"
                         Orientation="Horizontal">
                <Label Text="Buffer distance (miles):"
                       VerticalOptions="Center"/>
                <Entry x:Name="BufferDistanceMilesEntry" 
                       Text="10" />
            </StackLayout>
            <StackLayout Grid.Row="2"
                         Orientation="Horizontal">
                <Label Text="Union the buffers:"
                       VerticalOptions="Center"/>
                <Switch x:Name="UnionSwitch"
                        IsToggled="True" />
            </StackLayout>
            <StackLayout Orientation="Horizontal"
                         Grid.Row="3">
                <Button x:Name="BufferButton"
                        Text="Create buffers"
                        WidthRequest="120"
                        Clicked="BufferButton_Click"/>
                <Button x:Name="ClearButton"
                        Text="Clear"
                        WidthRequest="120"
                        Margin="10,0,0,0"
                        Clicked="ClearButton_Click" />
            </StackLayout>
        </Grid>
        <esriUI:MapView x:Name="MyMapView" 
                        Grid.Row="1"/>
    </Grid>
</ContentPage>


In this topic
  1. Code