|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.core.tasks.ags.geocode.Locator
public class Locator
This class allows you to geocode and reverse-geocode addresses using a geocode service of ArcGIS Server.
Geocoding involves finding matching locations for a given address.
Reverse-geocoding involves finding corresponding addresses for a given location.
Constructor Summary | |
---|---|
Locator(String url)
Constructor accepting the URL of a Geocode service |
|
Locator(String url,
UserCredentials credentials)
Constructor accepting the URL of a Geocode service |
Method Summary | |
---|---|
List<LocatorGeocodeResult> |
addressToLocations(Map<String,String> addressFields,
List<String> outFields)
Executes a geocoding operation to find location candidates for a given address. |
List<LocatorGeocodeResult> |
addressToLocations(Map<String,String> addressFields,
List<String> outFields,
SpatialReference outSR)
Executes a geocoding operation to find location candidates for a given address. |
void |
addressToLocationsAsync(Map<String,String> addressFields,
List<String> outFields,
CallbackListener<List<LocatorGeocodeResult>> listener)
|
void |
addressToLocationsAsync(Map<String,String> addressFields,
List<String> outFields,
SpatialReference outSR,
CallbackListener<List<LocatorGeocodeResult>> callback)
|
BatchGeocodeResult |
batchAddressToLocation(List<Map<String,String>> addresses)
Matches addresses to locations. |
BatchGeocodeResult |
batchAddressToLocation(List<Map<String,String>> addresses,
SpatialReference outSR)
Matches addresses to locations. |
void |
batchAddressToLocationAsync(List<Map<String,String>> addresses,
CallbackListener<BatchGeocodeResult> callback)
Matches addresses to locations asynchronously. |
void |
batchAddressToLocationAsync(List<Map<String,String>> addresses,
SpatialReference outSR,
CallbackListener<BatchGeocodeResult> callback)
Matches addresses to locations asynchronously. |
List<LocatorGeocodeResult> |
find(LocatorFindParameters findParams)
Executes a finding operation to find location candidates for a given address, POI, or a String Note: currently the method is only applied to the world geocoding service hosted on the ArcGIS online. |
void |
findAsync(LocatorFindParameters findParams,
CallbackListener<List<LocatorGeocodeResult>> callback)
Asynchronously executes a finding operation to find location candidates for a given address, POI, or a String Note: currently the method is only applied to the world geocoding service hosted on the ArcGIS online. |
LocatorServiceInfo |
getInfo()
Returns the information of the Geocode service this instance is querying from such as address fields, candidate fields, service properties... |
String |
getUrl()
Returns the URL of the Geocode service used by this instance of the Locator. |
LocatorReverseGeocodeResult |
locationToAddress(Point point,
double distance)
Executes a reverse-geocoding operation to find address candidates for a given location. |
LocatorReverseGeocodeResult |
locationToAddress(Point point,
double distance,
SpatialReference inSR,
SpatialReference outSR)
Executes a reverse-geocoding operation to find address candidates for a given location. |
void |
locationToAddressAsync(Point point,
double distance,
CallbackListener<LocatorReverseGeocodeResult> callback)
|
void |
locationToAddressAsync(Point point,
double distance,
SpatialReference inSR,
SpatialReference outSR,
CallbackListener<LocatorReverseGeocodeResult> callback)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Locator(String url)
url
- URL to the REST endpoint of a Geocode servicepublic Locator(String url, UserCredentials credentials) throws EsriSecurityException
url
- URL to the REST endpoint of a Geocode servicecredentials
- the credentials used for accessing a secure Geocode service
EsriSecurityException
Method Detail |
---|
public String getUrl()
public LocatorServiceInfo getInfo() throws Exception
LocatorServiceInfo
containing the service information
Exception
public List<LocatorGeocodeResult> addressToLocations(Map<String,String> addressFields, List<String> outFields) throws Exception
addressFields
- a Map containing the address fields and their corresponding valuesoutFields
- a List of output fields to be returned for each address candidate
LocatorGeocodeResult
s.
Exception
public void addressToLocationsAsync(Map<String,String> addressFields, List<String> outFields, CallbackListener<List<LocatorGeocodeResult>> listener) throws Exception
Exception
public List<LocatorGeocodeResult> addressToLocations(Map<String,String> addressFields, List<String> outFields, SpatialReference outSR) throws Exception
addressFields
- a Map containing the address fields and their corresponding valuesoutFields
- a List of output fields to be returned for each address candidateoutSR
- a spatial reference the location candidates will be projected to.
LocatorGeocodeResult
s.
Exception
public void addressToLocationsAsync(Map<String,String> addressFields, List<String> outFields, SpatialReference outSR, CallbackListener<List<LocatorGeocodeResult>> callback) throws Exception
Exception
public BatchGeocodeResult batchAddressToLocation(List<Map<String,String>> addresses) throws Exception
addresses
- the addresses to match
Exception
public BatchGeocodeResult batchAddressToLocation(List<Map<String,String>> addresses, SpatialReference outSR) throws Exception
addresses
- the addresses to matchoutSR
- the output spatial reference
Exception
public void batchAddressToLocationAsync(List<Map<String,String>> addresses, CallbackListener<BatchGeocodeResult> callback)
addresses
- the addresses to matchcallback
- the call back executed when the geocode operation completespublic void batchAddressToLocationAsync(List<Map<String,String>> addresses, SpatialReference outSR, CallbackListener<BatchGeocodeResult> callback)
addresses
- the addresses to matchoutSR
- the output spatial referencecallback
- the call back executed when the geocode operation completespublic LocatorReverseGeocodeResult locationToAddress(Point point, double distance) throws Exception
point
- the location to search for address candidates.distance
- the distance in meters from the given location within which a matching address should be searched.
LocatorReverseGeocodeResult
Exception
public void locationToAddressAsync(Point point, double distance, CallbackListener<LocatorReverseGeocodeResult> callback) throws Exception
Exception
public LocatorReverseGeocodeResult locationToAddress(Point point, double distance, SpatialReference inSR, SpatialReference outSR) throws Exception
Executes a reverse-geocoding operation to find address candidates for a given location.
A distance in meters from the given location within which a matching address should be searched must be provided, 0
if non is desired.
The input spatial reference can be specified if the location coordinates are in a different spatial reference than
the one expected by the service.
An Output spatial reference can be specified if the coordinates for the address candidates are wanted in a
different spatial reference than the one defined in the service.
point
- the location to search for address candidates.distance
- the distance in meters from the given location within which a matching address should be searched.inSR
- the input spatial reference for the location.outSR
- the output spatial reference for the location of the address candidates
LocatorReverseGeocodeResult
Exception
public void locationToAddressAsync(Point point, double distance, SpatialReference inSR, SpatialReference outSR, CallbackListener<LocatorReverseGeocodeResult> callback) throws Exception
Exception
public List<LocatorGeocodeResult> find(LocatorFindParameters findParams) throws Exception
findParams
- the find parameters
LocatorGeocodeResult
s.
Exception
- the exceptionpublic void findAsync(LocatorFindParameters findParams, CallbackListener<List<LocatorGeocodeResult>> callback)
findParams
- the find parameters
Exception
- the exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |