Here's the following script...I had 620 errors. I have put a setTimeout
() function to parry this but I still have problem to make it
work...Any idea??? I really need to fix this...This is the only
problem I have...If you really want to see the map I can make it
available this morning.

Its a commercial project and we really need to fix it. We have
deadlines.

points variable is an array generate with this syntax:
points[0][0][lat]
points[0][0][lng]
points[0][0][laddress]
points[0][0][desc]


<script type="text/javascript">
         if (GBrowserIsCompatible()) {
            <?arrayToJS4($waypoints, "points");?>//
            var map = new GMap2(document.getElementById("map"));

            //Map options
            map.addControl(new GLargeMapControl());
            map.enableScrollWheelZoom();

            var i,j;;
            function getDirections(directionsArray){
               for(i=0;i<directionsArray.length;i+=2){//
                  var directions = new GDirections(map);
                  GEvent.addListener( directions,"error", function() {
                        alert("GDirections
Failed:"+directions.getStatus().code);
                  } );
                  directions.loadFromWaypoints( [directionsArray
[i],directionsArray[i+1]] );
                  delete(directions);
               }
            }

            var waypoints = new Array();
            for(i=0;i<points.length;i++){
               for(j=0;j<points[i].length;j=j+2){  //
                  waypoints[0] = points[i][j]['lat']+","+points[i][j]
['lng'];
                  waypoints[1] = points[i][j+1]['lat']+","+points[i][j
+1]['lng'];

                  //====three tries without success====
                  setTimeout(getDirections(waypoints),100);
                  //getDirections(waypoints);s
                  //sleep(100);
               }
            }
         }
</script>

--

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