After reading up on dojo.hitch in "the Definitive Guide" by Matthew Russell, I learned that one can pass extra parameters using dojo.hitch. Now I can pass the item index "i" and get it back on the callback "index".this._locator.addressToLocations(address, ["Loc_name", "StreetName", "City", "State", "ZIP", "Match_addr"] , dojo.hitch(this, function(index,candidates) {
var candidate;
for (var i=0, il=candidates.length; i<il; i++) {
candidate = candidates;
if (candidate.score >= 80) {
this.addDataToMap("0" , this._items[index].geoType, this._items[index].image, this._items[index].name,
this._items[index].id,
this._items[index].address,
this._items[index].city,
this._items[index].state,
this._items[index].zip, candidate.location.x, candidate.location.y ,null);
}
}
},
i
));