tags:

views:

83

answers:

1

Hi,

I have real-time GPS data stored in a database and I'm currently pulling the lat/lon from this data and dynamically displaying them as markers on a Google Map.

What I'm trying to accomplish is to use these lat/lon points to draw a path connecting them. I looked at GDirections, but that seems like it's only used to connect two points together. I'm looking for something where I can send a bunch of GPS coordinates, from start to finish, and have it draw the path on the map connecting them.

Any guidance is greatly appreciated.

A: 

Apparently it was a lot easier than I thought. This seems to do the trick: echo "var polyline = new GPolyline([new GLatLng($startlat, $startlon), new GLatLng($endlat, $endlon)], \"#ff0000\", 10);"; echo 'map.addOverlay(polyline);';

sw333t