tags:

views:

40

answers:

0

My aim is to get distance between many locations thru GDirection object. Since I am using multiple objects, am not able to get distnace. Can someone help me out. Below is the code.

      for(ct=0;ct<size;ct++)
    {
         var gd=new GDirections();

     gd.load("from: " + address + " to: " + offaddress[ct]);


     GEvent.addListener(directions,"load", function() {


     sor[ct]= gd.getDistance().html;    

     }