World Geocoding Online

This sample demonstrates how to search for places using the World Geocoding Service. The World Geocoding Service (http://geocode.arcgis.com) supports single field input, multiple field inputs, batch, and reverse geocoding. The service provides access to a comprehensive worldwide database of places, including landmarks, points of interest, and businesses. This sample illustrates how to search for places from a specific location and rank results based on distance from that location. Use the search textbox to enter any valid place and navigate the map to change the location from which the service will prioritize and rank results. Results are displayed on the Map and in a FeatureDataGrid.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.WorldGeocoding"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <esri:SimpleRenderer x:Key="MySelectionRenderer">
                <esri:PictureMarkerSymbol Source="/Assets/Images/i_pushpin.png" OffsetX="8" OffsetY="8" />
            </esri:SimpleRenderer>
            <esri:SimpleRenderer x:Key="MySimpleRenderer">
                <esri:SimpleRenderer.Symbol>
                    <esri:PictureMarkerSymbol Source="/Assets/Images/point-16x16.png" OffsetX="8" OffsetY="8" />
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
        </Grid.Resources>
        <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True"  WrapAround="True" Extent="2636359.040,4573160.312,2646142.979,4578315.528" Grid.Row="0">
            <esri:ArcGISTiledMapServiceLayer 
                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
            <esri:GraphicsLayer ID="SearchOriginGraphicsLayer" Renderer="{StaticResource MySimpleRenderer}" />
            <esri:GraphicsLayer ID="FindResultLocationsGraphicsLayer" Renderer="{StaticResource MySelectionRenderer}" 
                                MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown">
                <esri:GraphicsLayer.MapTip>
                    <Border Background="White" esri:GraphicsLayer.MapTipAutoPosition="True" BorderBrush="Black" 
                            BorderThickness="1">
                        <StackPanel Orientation="Vertical" Margin="5" >
                            <TextBlock Text="{Binding [PlaceName]}" HorizontalAlignment="Left" />
                            <TextBlock Text="{Binding [City]}" HorizontalAlignment="Left" />
                        </StackPanel>
                    </Border>
                </esri:GraphicsLayer.MapTip>
            </esri:GraphicsLayer>
        </esri:Map>
        <Canvas Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="0" >
            <Ellipse Width="10" Height="10" Stroke="#BB000000" StrokeThickness="1" Canvas.Left="5" Canvas.Top="5" />
            <Line X1="0" X2="20" Y1="10" Y2="10" Stroke="#BB000000" StrokeThickness="1" />
            <Line X1="10" X2="10" Y1="0" Y2="20" Stroke="#BB000000" StrokeThickness="1" />
        </Canvas>
        <Border HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" Padding="5" Background="White" 
                BorderBrush="Black" BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect />
            </Border.Effect>
            <StackPanel Orientation="Vertical">
                <TextBox x:Name="SearchTextBox" Width="150" Margin="5" MaxLength="60" Text="Starbucks" 
                         AcceptsReturn="True"/>
                <Button Content="Search" x:Name="SearchButton" Margin="5" Click="FindButton_Click"
                        HorizontalAlignment="Center" Width="100" Height="25" />
                <Button Content="Cancel" x:Name="Cancel" Margin="5" Click="Cancel_Click"
                        HorizontalAlignment="Center" Width="100" Height="25" />
            </StackPanel>
        </Border>
        <ProgressBar x:Name="MyProgressBar" IsIndeterminate="True" VerticalAlignment="Bottom" Width="200" Height="20" Margin="10" Visibility="{Binding Path=IsBusy, Converter={StaticResource BooleanToVisibilityConverter}}"></ProgressBar>
    </Grid>
   
</UserControl>

Sample code usage restrictions
5/16/2014