In this example you will learn how add travel modes in directions in google map.
Here you can view the output of the example and you can also "try it yourself" by clicking on "Live Demo" button given at the bottom.
Syntax
Above example will produce following output