Find Address

This sample demonstrates how you can use the LocatorTask API to geocode an address and display it with a pin on the map. Tapping the pin displays the reverse-geocoded address in a callout.

Find an address or place

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.FindAddress.FindAddress"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border
                Background="White" BorderBrush="Black" BorderThickness="1"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBox Grid.Row="0" Grid.Column="0" x:Name="MySearchBox" IsEnabled="False" />
                <Button Content="Search" Grid.Row="0" Grid.Column="1" Click="Button_Click" IsEnabled="False" x:Name="MySearchButton" />
                <ComboBox x:Name="MySuggestionBox" SelectionChanged="OnSuggestionChosen" Grid.Row="1" Grid.ColumnSpan="2" IsEnabled="False" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code