ArcGIS Runtime SDK for WPF - Library Reference
Locator Class
Members  See Also 
ESRI.ArcGIS.Client.Tasks Namespace : Locator Class

Represents a geocode service resource exposed by the ArcGIS Server REST API. It is used to generate candidates for an address. It also used to find an address for a given location.

Object Model

Locator ClassLocatorFindResult ClassAddress Class

Syntax

Visual Basic (Declaration) 
Public NotInheritable Class Locator 
   Inherits TaskBase
C# 
public sealed class Locator : TaskBase 

Remarks

Developers can use the World Geocoding Service by Esri to find point locations of addresses, business names, points of interest, etc. using a single geocoding service. More information about the World Geocoding Service can be found at http://geocode.arcgis.com.

To perform a batch geocode of a list of addresses use the Locator.AddressesToLocationsAsync Method. The results of this geocode operation are returned via the Locator.AddressesToLocationsCompleted Event. The result parameter of the event yields a AddressesToLocationsResult object. This object can be interrogated for its AddressCandidates Property which is a list of AddressCandidate objects. Each AddressCandidate object has numerous Properties such as .Address, .Attributes, geographic .Location, and .Score that can be used to display the geocoding results in a Map out in tabular format.

If only one address is desired to be geocoded, use the Locator.AddressToLocationsAsync Method. The results of this geocode operation are returned via the Locator.AddressToLocationsCompleted Event. The result parameter of the event yields a list of AddressCandidate objects. Each AddressCandidate object has numerous Properties such as .Address, .Attributes, geographic .Location, and .Score that can be used to display the geocoding results in a Map out in tabular format.

To obtain a list of geocoded locations based upon a single string field and an optional MapPoint input location use the Locator.FindAsync Method (NOTE: This option can be useful for finding single string items such as place names, store locations, and points-of-interest). The results of this geocode operation are returned via the Locator.FindCompleted Event. The result parameter of the event yields a LocatorFindResult object. This object can be interrogated for its Locations Property which is a list of Location objects. Each Location object has numerous Properties such as .Extent, .Graphic, and .Name that can be used to display the geocoding results in a Map out in tabular format.

To obtain the reverse geocoded address based up a MapPoint input location use the Locator.LocationToAddressAsync(MapPoint,Double,Object) Methods. The results of this reverse geocode operation are returned via the Locator.LocationToAddressCompleted Event. The Address parameter of the event yields an Address object. The Address object has Properties such as .Attributes, and geographic .Location that can be used to display the geocoding results in a Map out in tabular format.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Client.Tasks.TaskBase
      ESRI.ArcGIS.Client.Tasks.Locator

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.