Google gave an example http://googlemapsapi.blogspot.com/2007/05/driving-directions-support-added-to.html
Is the source code available somewhere or a tutorial on tha
Here's a very basic example using the v3 API:
Google Maps API v3 Directions Example
Screenshot: