You can try out something like this.

  var longitude;
  var latitude;
  var speed;

  //Declare and initialize a new array to hold longitude latitude values
  var points = new Array();
      for (i=0 ; i<trajetarray; i++)
      {
          s = trajetarray[i];
          var exp=explode(";", s);
          longitude = exp[0];
          latitude = exp[1];
          speed = exp[2];
          //add values to points array
          points.push(new GLatLng(latitude, longitude));
      }
          //Make sure u add latitude and longitude values sequentially to
points array.
          //The way you enter points to the points array will be the order
the GPolyline class will draw the line.
          //This means the first point is connected to the second point and
second point is connected to third and so on.
         map.addOverlay(new GPolyline(points));

--~--~---------~--~----~------------~-------~--~----~
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