public class

LocatorFindParameters

extends Object
java.lang.Object
   ↳ com.esri.core.tasks.geocode.LocatorFindParameters

Class Overview

Class holding the parameters to support the find operation for a geocoding service or local locator.

The find operation is used for single field geocoding, such as:

  • Street addresses: 380 New York St, Redlands, CA 92373
  • Administrative place names, such as city/county/state/province/country names: Seattle, Washington
  • Postal codes: 92591 USA
  • Points of interest (POI) and businesses: Disneyland,banks in Paris

Summary

Public Constructors
LocatorFindParameters(String text)
Constructs a FindParameters object with the given search text.
Public Methods
boolean equals(Object obj)
double getDistance()
Returns the radial search distance in meters.
SpatialReference getInSR()
Returns the spatial reference of the search extent.
Point getLocation()
Returns the Point geometry of the search location.
int getMaxLocations()
Returns the maximum number of returned candidates.
List<String> getOutFields()
Returns a list of fields to be returned in the response.
SpatialReference getOutSR()
Returns the output spatial reference of the x,y coordinates for the geocode request.
Envelope getSearchExtent()
Returns the search extent used to spatially filter the results.
String getSourceCountry()
Returns the source country string used to filter results.
String getText()
Returns the search text.
int hashCode()
void setDistance(double distance)
Sets the search distance, in meters, from the location set in setLocation(Point, SpatialReference).
void setLocation(Point location, SpatialReference sr)
Sets the search location.
void setMaxLocations(int maxLocations)
Sets the maximum number of returned candidates.
void setOutFields(List<String> outFields)
Sets a list of fields to be returned in the response.
void setOutSR(SpatialReference outSR)
Sets the output spatial reference of the returned candidates.
void setSearchExtent(Envelope searchExtent, SpatialReference inSR)
Sets the search extent to spatially filter the search results.
void setSourceCountry(String sourceCountry)
Sets a string value representing a country.
void setText(String text)
Sets the search text.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LocatorFindParameters (String text)

Constructs a FindParameters object with the given search text.

Parameters
text String: search string, e.g. address, point of interest (POI), or postal code

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public double getDistance ()

Returns the radial search distance in meters.

Returns
double the search distance in meters

public SpatialReference getInSR ()

Returns the spatial reference of the search extent.

Returns
SpatialReference the spatial reference of the search extent

public Point getLocation ()

Returns the Point geometry of the search location.

Returns
Point the search location

public int getMaxLocations ()

Returns the maximum number of returned candidates.

Returns
int the maximum number of returned candidates

public List<String> getOutFields ()

Returns a list of fields to be returned in the response.

Returns
List<String> a list of field names

public SpatialReference getOutSR ()

Returns the output spatial reference of the x,y coordinates for the geocode request.

Returns
SpatialReference the spatial reference that returned location candidates will be projected to

public Envelope getSearchExtent ()

Returns the search extent used to spatially filter the results.

Returns
Envelope the search extent

public String getSourceCountry ()

Returns the source country string used to filter results.

Returns
String string representation of the source country e.g. "USA"

public String getText ()

Returns the search text.

Returns
String search text string

public int hashCode ()

Returns
int

public void setDistance (double distance)

Sets the search distance, in meters, from the location set in setLocation(Point, SpatialReference). All candidates that fall within this search distance will have their scores boosted (more likely to be top results).

Parameters
distance double: the search distance in meters

public void setLocation (Point location, SpatialReference sr)

Sets the search location. This parameter is used in conjunction with setDistance(double) to define a radial area in which potential candidate scores will be boosted. By default, if a distance is not set with a location, the radial search distance is 2000m. Unlike setSearchExtent(Envelope, SpatialReference), setLocation(Point, SpatialReference) does not restrict potential candidates, it simply increases the priority of candidates within the radial search location.

Parameters
location Point: the location to set
sr SpatialReference: spatial reference of the point

public void setMaxLocations (int maxLocations)

Sets the maximum number of returned candidates. By default, this values is 10.

Parameters
maxLocations int: the maximum number of candidates to return

public void setOutFields (List<String> outFields)

Sets a list of fields to be returned in the response. If null or empty, no output fields will be returned on the result. Pass a list with an asterisk ("*") to return all output fields. Output fields do not affect the score, geometry, or address returned on each LocatorGeocodeResult.

Parameters
outFields List: a list of output field names

public void setOutSR (SpatialReference outSR)

Sets the output spatial reference of the returned candidates. If null, candidates will be returned in the default spatial reference of the service/local data.

Parameters
outSR SpatialReference: the desired output spatial reference for the geometries of the geocoding results

public void setSearchExtent (Envelope searchExtent, SpatialReference inSR)

Sets the search extent to spatially filter the search results. All results outside of the search extent will not be returned.

Parameters
searchExtent Envelope: the envelope (xmin, ymin, xmax, ymax) to be used to filter results
inSR SpatialReference: the spatial reference of the search envelope

public void setSourceCountry (String sourceCountry)

Sets a string value representing a country. Providing a country string can increase geocoding speed and help to filter potentially ambiguous results. Acceptable values include full country name, ISO 3166-1 2-digit country codes, and ISO 3166-1 3-digit country codes.

Parameters
sourceCountry String: string representation of a country

public void setText (String text)

Sets the search text.

Parameters
text String: the search text

public String toString ()

Returns
String