ArcGIS Runtime SDK for .NET Samples

Format coordinates

Format geographic coordinates
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.FormatCoordinates.FormatCoordinates">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Label Grid.Row="0" Grid.Column="0" HorizontalTextAlignment="End">Decimal Degrees</Label>
        <Entry Grid.Row="0" Grid.Column="1" Placeholder="Decimal Degrees" x:Name="DecimalDegreesTextField" />
        <Label Grid.Row="1" Grid.Column="0" HorizontalTextAlignment="End">Degrees, Minutes, Seconds</Label>
        <Entry Grid.Row="1" Grid.Column="1" Placeholder="Degrees, Minutes, Seconds" x:Name="DmsTextField" />
        <Label Grid.Row="2" Grid.Column="0" HorizontalTextAlignment="End">UTM</Label>
        <Entry Grid.Row="2" Grid.Column="1" Placeholder="UTM" x:Name="UtmTextField" />
        <Label Grid.Row="3" Grid.Column="0" HorizontalTextAlignment="End">USNG</Label>
        <Entry Grid.Row="3" Grid.Column="1" Placeholder="USNG" x:Name="UsngTextField" />
        <Button Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Clicked="RecalculateFields" Text="Recalculate" />
        <esriUI:MapView Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" x:Name="MyMapView" />
    </Grid>
</ContentPage>


In this topic
  1. Code