Problem with setTimeout inside $.each ...
Hello,
Im back showing my ignorance again.
This time, I apparently dont understand the settimeout function.
It seems to work the first time but after that it seems to ignore it.
I think it's a scope problem but im not sure. Ive used several examples but they all give the same results.
Here is my code:
- $.each($json.PDMOVE, function () {
- setTimeout(function() {
-
- var nocntrs = 'No Containers = ' + $json.PDMOVE[x].SCCNTR;
- var address = $json.PDMOVE[x].SCADR1 + ',' + $json.PDMOVE[x].SCCITY
- var name = $json.PDMOVE[x].SCCUST + ' - ' + $json.PDMOVE[x].SCNAME;
- geocoder.geocode({'address': address}, function(results, status) {
- if (status != google.maps.GeocoderStatus.OK) {