moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js
MIT License
559 stars 148 forks source link

Successive request via gmAPI not working #99

Open aj07mm opened 8 years ago

aj07mm commented 8 years ago

Hi! i have this function:

gmAPI.directions(params, function(err, res){
      var duration  = res.routes[0].legs[0].duration.text;
      console.log(duration);
});

inside a two for loop, and it doesn't pass the first call, it stays there. I tried settimeout with 1000 and 3000 but no go, any of you guys know the prob?

fabriziomoscon commented 8 years ago

You might need to publish a bit more of your code to receive proper help.