Hi

function getDirectionsAll()
{
    var start;
    var end;
        GEvent.addListener(directionsAll,"load",function(){
            polyAll=directionsAll.getPolyline(true);
            polyAll.color = "#ff0000";
            polyAll.opacity = 1;
            polyAll.weight = 2;
            if(polyAll){
                map.addOverlay(polyAll);
            }
         });
        for (var elem=0; elem<markers.length; elem++)
        {
                start = markers[elem].getAttribute("address");
                alert(elem);
                var newI = elem+1;
                if(newI < markers.length){
                        end = markers[newI].getAttribute("address");
                        //alert('location '+ elem +' start '+ start + ' end '+ 
end);
                        directionsAll.load("from:"+ start +", Kingston, ON to: 
"+ end +",
Kingston, ON",GDirectionsOptions);
                }
        }
}


I am using the above code to display the directions  based on the
values loaded from the xml file. they are in array called markers. But
while loading them its not displaying all location directions, few
direction are missed out. Could please help me to find the issue
behind this.

thanks
http://phpqa.blogspot.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to