Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: AddressCandidate

dojo.require("esri.tasks.AddressCandidate")

Description

(Added at v1.0)
Represents an address and its location. AddressCandidate has no constructor.

Samples

Search for samples that use this class.

Properties

NameTypeSummary
addressObjectAddress of the candidate.
attributesObjectName value pairs of field name and field value as defined in outFields in Locator.addressToLocations.
locationPointX- and y-coordinate of the candidate.
scoreNumberNumeric score between 0 and 100 for geocode candidates.
Property Details

<Object> address

Address of the candidate. It contains one property for each of the address fields defined by a geocode service. Each address field describes some part of the address information for the candidate.

<Object> attributes

Name value pairs of field name and field value as defined in outFields in Locator.addressToLocations.

<Point> location

X- and y-coordinate of the candidate.

<Number> score

Numeric score between 0 and 100 for geocode candidates. A candidate with a score of 100 means a perfect match, and 0 means no match.
Sample:
dojo.forEach(addressCandidates, function(candidate) {
  if (candidate.score > score && candidate.attributes.Loc_name === "US_RoofTop") {
    stop = candidate;
    score = candidate.score;
  }
});
Show Modal