title: How to use transit mode in google maps
body: <p>I am working on google maps api. I need to show the map according to travel modes. I have four modes car, bicycle, walking and train. Google map loads according to selected mode. My first 3 options are working fine but how i can pass train in transit mode. Please help me.</p>
  
  <pre><code>travel_mode = jQuery('#mode').val();        
  if(a==="")
    this.showAlert(this.options.msgEmpty); 
  else
  {
    a= {
      origin:a,
      destination:new google.maps.LatLng(this.options.lat,this.options.lng),
      travelMode:google.maps.DirectionsTravelMode[travel_mode]
    };
  }
  </code></pre>