Batch Geocoding

The sample showcases 10.1 GeocodeServer's new capability of performing a batch Geocoding on local data. To use the sample use the default list of addresses and click in Find Addresses button. You may also clear pre-populated list of addresses and enter new addresses using the Street and Zip input fields.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.LocalBatchGeocoding"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
   xmlns:basics="http://schemas.microsoft.com/wpf/2008/toolkit"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="5" />
            <RowDefinition Height="150" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <esri:PictureMarkerSymbol x:Key="DefaultMarkerSymbol" OffsetX="12" OffsetY="12" Source="/Assets/Images/x-24x24.png" />
        </Grid.Resources>
        <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" Extent="-122.519985221, 37.836494682 ,-122.302264539 , 37.698485944">
            <esri:ArcGISLocalTiledLayer Path="..\Data\TPKS\SanFrancisco.tpk"/>
            <esri:GraphicsLayer ID="LocationGraphicsLayer" MouseLeftButtonDown="GraphicsLayer_MouseLeftButtonDown">
                <esri:GraphicsLayer.MapTip>
                    <Grid Background="LightYellow" esri:GraphicsLayer.MapTipAutoPosition="True">
                        <StackPanel Orientation="Vertical" Margin="5" >
                            <TextBlock Text="{Binding [Match_addr]}" HorizontalAlignment="Left" />
                            <TextBlock Text="{Binding [X],StringFormat='X : {0}'}" HorizontalAlignment="Left" />
                            <TextBlock Text="{Binding [Y],StringFormat='Y : {0}'}" HorizontalAlignment="Left" />
                        </StackPanel>
                        <Border BorderBrush="Black" BorderThickness="1" />
                    </Grid>
                </esri:GraphicsLayer.MapTip>
            </esri:GraphicsLayer>
        </esri:Map>
        <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,15,15,0" >
            <Rectangle Stroke="Gray"  Fill="#77919191" Margin="0,0,0,5" >
                <Rectangle.Effect>
                    <DropShadowEffect/>
                </Rectangle.Effect>
            </Rectangle>
        </Grid>
        <Border Background="#FFEFF1F3" BorderThickness="1" 
                HorizontalAlignment="Right"  VerticalAlignment="Top"
                Padding="10" BorderBrush="Black" Margin="0,15,15,0" >
            <Border.Effect>
                <DropShadowEffect/>
            </Border.Effect>
            <Grid HorizontalAlignment="Left">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="ResponseTextBlock" Text="Add addresses to the list using fields below and click on the button below to geocode addresses."                           
                           Width="300" TextAlignment="Left"  TextWrapping="Wrap" Margin="0,0,5,5" Grid.Row="0" Grid.ColumnSpan="2" Foreground="black"/>
                <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0">
                    <TextBlock Text="Street :" VerticalAlignment="Center" Margin="0,5,0,0" Foreground="black"/>
                    <TextBox x:Name="StreetTextBox" Width="150" Margin="2,5,5,0" HorizontalAlignment="Left" MaxLength="60"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" Margin="2,0,0,0">
                    <TextBlock Text="Zip :" VerticalAlignment="Center" Margin="0,5,0,0" Foreground="Black"/>
                    <TextBox x:Name="ZipTextBox" Margin="2,5,0,0" HorizontalAlignment="Left" MaxLength="5" Width="60"/>
                    <Button x:Name="addtolist" Click="addtolist_Click" Height="25" IsEnabled="False" Margin="2,5,0,0" HorizontalAlignment="Left">
                        <Image Source="/Assets/Images/add.png" ToolTip="Add to list"/>
                    </Button>
                </StackPanel>
                <Border BorderBrush="Black" BorderThickness="1" Grid.Row="2" HorizontalAlignment="Stretch" Grid.ColumnSpan="2" Margin="0,10,0,0">
                    <ListBox x:Name="AddressListbox" HorizontalAlignment="Stretch" Grid.Row="0" Grid.ColumnSpan="2" Margin="5">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding [Street]}"/>
                                    <TextBlock Text="{Binding [Zip], StringFormat=', {0}'}"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Border>
                <Button x:Name="ResetList" Content="Reset" Click="ResetList_Click" IsEnabled="False" Grid.Row="3" Grid.Column="0" Margin="0,5,0,5" Height="25" ToolTip="Reset List"/>
                <Button x:Name="BatchGeocodeButton" Content=" Find Addresses " IsEnabled="False" ToolTip="Find Addresses" Margin="2,5,0,5" Click="BatchGeocodeButton_Click" 
                                Grid.Row="3" Grid.Column="1" Height="25" />
            </Grid>
        </Border>
        <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" />
        <esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid" 
				Map="{Binding ElementName=MyMap}"/>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014