I have a list of zip codes to loop over to get the lat/lng. How do I pass the object zip to the "success" method so I can assign the lat/lng to the right zip object? Right now by the time I get the results back, I assign them to the wrong zip :-(
I believe the response is the dataContext object but when I tried { zip : zip }, it didn't work. The response contains no such property.
for (var j = 0; j < zipList.length; j++) {
var zip = zipList[j];
L.esri.Geocoding.geocode().postal(zip.Zipcode).run(function (err, results, response) {
alert(response.zip);
}, { zip : zip });
}