How to draw a Rout map from coordinate array

Hello All
I want to draw a rout map from coordinate array on google map using java script.
is any one help me to provide sample code.

Thanks
Atul Saini