AGSLocator Class Reference
Description
An instance of this class allows you to geocode and reverse-geocode addresses using a geocode service of ArcGIS Server. For example, http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Places_World/GeocodeServer.
Geocoding involves finding matching locations for a given address. Reverse-geocoding involves finding corresponding addresses for a given location.
- Defined in:
- AGSLocator.h ( ArcGIS library)
- Since:
- 1.0
- See also:
- What is geocoding?
List of all members.
Member Function Documentation
- (NSOperation *) addressForLocation: |
|
(AGSPoint *) |
location |
maxSearchDistance: |
|
(double) |
distance | |
|
|
| | |
Executes a reverse-geocoding operation to find address candidates for a given location. The delegate
will be notified when the operation completes or if an error is encountered..
It relies on the Reverse Geocode operation of the REST resource.
- Parameters:
-
| location | Location to search for address candidates. If the AGSPoint does not have a spatial reference, it is assumed to be in the same spatial reference as that of the geocode service. |
| distance | Distance in meters from the given location within which a matching address should be searched. If this parameter is not provided or an invalid value is provided, a default value of 0 meters is used. |
- Returns:
NSOperation
for current request.
- Since:
- 1.0
- See also:
- AGSLocatorDelegate
- (NSOperation *) addressForLocation: |
|
(AGSPoint *) |
location |
maxSearchDistance: |
|
(double) |
distance |
outSpatialReference: |
|
(AGSSpatialReference *) |
sr | |
|
|
| | |
Executes a reverse-geocoding operation to find address candidates for a given location. The delegate
will be notified when the operation completes or if an error is encountered.
It relies on the Reverse Geocode operation of the REST resource.
- Parameters:
-
| location | Location to search for address candidates. If the AGSPoint does not have a spatial reference, it is assumed to be in the same spatial reference as that of the geocode service. |
| distance | Distance in meters from the given location within which a matching address should be searched. If this parameter is not provided or an invalid value is provided, a default value of 0 meters is used. |
| sr | Spatial reference of output geometries. |
- Returns:
NSOperation
for current request. - Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- See also:
- AGSLocatorDelegate
- (id) initWithURL: |
|
(NSURL *) |
url |
|
|
Initialize the task.
- Parameters:
-
| url | URL to a task resource in the ArcGIS Server REST Services Directory. |
- Returns:
- A new task object.
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initialize the task with a URL and credential to a secured resource.
- Parameters:
-
| url | URL to a task resource in the ArcGIS Server REST Services Directory. |
| cred | AGSCredential used to access secure resource. |
- Returns:
- A new task object.
- Since:
- 1.0
- (NSOperation *) locationsForAddress: |
|
(NSDictionary *) |
address |
returnFields: |
|
(NSArray *) |
outFields | |
|
|
| | |
Executes a geocoding operation to find location candidates for a given address. The delegate
will be notified when the operation completes or if an error is encountered.
It relies on the Find Address Candidates operation of the REST resource.
- Parameters:
-
| address | A dictionary with key-value pairs of address field name and value. The address fields for a geocode service resource are listed in the Address Fields section of the Services Directory. |
| outFields | A list of candidate fields you want to be included in the returned results. If the address represents an intersection, you need to specify fields from the Intersection Candidate Fields section of the Services Directory. If the address does not represent an intersection, you need to specify fields from the Candidate Fields section. For geocode services of ArcGIS Server 10 or above, you can specify "*" to get all the fields. |
- Returns:
NSOperation
for current operation.
- Since:
- 1.0
- See also:
- AGSLocatorDelegate
- (NSOperation *) locationsForAddress: |
|
(NSDictionary *) |
address |
returnFields: |
|
(NSArray *) |
outFields |
outSpatialReference: |
|
(AGSSpatialReference *) |
sr | |
|
|
| | |
Executes a geocoding operation to find location candidates for a given address. The delegate
will be notified when the operation completes or if an error is encountered.
It relies on the Find Address Candidates operation of the REST resource.
- Parameters:
-
| address | Dictionary with key-value pairs of address field name and value. The address fields for a geocode service resource are listed in the Address Fields section of the Services Directory. |
| outFields | List of candidate fields you want to be included in the returned results. If the address represents an intersection, you need to specify fields from the Intersection Candidate Fields section of the Services Directory. If the address does not represent an intersection, you need to specify fields from the Candidate Fields section. For geocode services of ArcGIS Server 10 or above, you can specify "*" to get all the fields. |
| sr | Spatial reference of output geometries. |
- Returns:
NSOperation
for current operation. - Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- See also:
- AGSLocatorDelegate
+ (id) locatorWithURL: |
|
(NSURL *) |
url |
|
|
Initialize autoreleased Locator.
- Parameters:
-
| url | URL to a geocode service. |
- Returns:
- A new, autoreleased, locator object
- Since:
- 1.0
+ (id) locatorWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initialize autoreleased Locator.
- Parameters:
-
| url | URL to a geocode service. |
| cred | AGSCredential to access a secure locator. |
- Returns:
- A new, autoreleased, locator object.
- Since:
- 1.0
Property Documentation
The credential to be used to access secured resources.
- Since:
- 1.0
Reimplemented from <AGSSecuredResource>.
Delegate to be notified when the locator completes successfully or encounters an error.
- Since:
- 1.0
- (NSURL*) URL [read, copy, inherited] |
URL to a task resource in the ArcGIS Server REST Services Directory.
- Since:
- 1.0