Nighteyez07

Locator task methods question

Discussion created by Nighteyez07 on May 20, 2014
I'm trying to establish if there is something wrong with the setup of my locator service or if this is how the functionality is intended to be. And if it's intended, if there may be a chance to modify.

First up we have:
addressToLocations: Returns an array of best candidates which are scored. 1:n ratio.
{"spatialReference":{"wkid":32149,"latestWkid":32149},
"candidates":[
{"address":"216A42","location":{"x":0.0,"y":0.0},"score":100,"attributes":{"Score":100,"Match_addr":"216A42","Name":"216A42","Type":"STRUCTURE","City":"","State":"","Country":"","Ref_ID":"2252","Addr_type":"Address"}},
{"address":"216A42E","location":{"x":0.0,"y":0.0},"score":81.25,"attributes":{"Score":81.25,"Match_addr":"216A42E","Name":"216A42E","Type":"STRUCTURE","City":"","State":"","Country":"","Ref_ID":"154","Addr_type":"Address"}}]}



Then we have
addressesToLocations: This allows user to submit an array an objects that have the address to locate. However, on the return of this function, it looks like it only returns the highest scored match for each address. By a 1:1 ratio. Is there a technical reason why this only returns 1 match per address instead of all matches like how addressToLocations works? Here is an example result with certain info removed.
dojo.io.script.jsonp_dojoIoScript5._jsonpCallback(
{"spatialReference":{"wkid":0,"latestWkid":0},
"locations":[{"address":"FED","location":{"x":0.0,"y":0.0},"score":100,"attributes":{"ResultID":-1,"Status":"M","Score":100,"Match_addr":"FED","Ref_ID":"2309","Addr_type":"Address"}},
{"address":"2261STEVENS","location":{"x":0.0,"y":0.0},"score":94.230000000000004,"attributes":{"ResultID":-1,"Status":"M","Score":94.230000000000004,"Match_addr":"2261STEVENS","Ref_ID":"2227","Addr_type":"Address"}},
{"address":"105B","location":{"x":0.0,"y":0.0},"score":100,"attributes":{"ResultID":-1,"Status":"M","Score":100,"Match_addr":"105B","Ref_ID":"2284","Addr_type":"Address"}}]});

Outcomes