Problem with setTimeout inside $.each ...

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:


  1.  $.each($json.PDMOVE, function () {                                  
  2. setTimeout(function() {                                             
  3.                                                   
  4. var nocntrs = 'No Containers = ' + $json.PDMOVE[x].SCCNTR;          
  5. var address = $json.PDMOVE[x].SCADR1 + ',' + $json.PDMOVE[x].SCCITY 
  6. var name = $json.PDMOVE[x].SCCUST + ' - ' + $json.PDMOVE[x].SCNAME; 
  7. geocoder.geocode({'address': address}, function(results, status) {  
  8. if (status != google.maps.GeocoderStatus.OK) {