title: Using TRANSIT as my travel mode in Google Map api v3
body: <p>When I was using TRANSIT as my travel mode in Google Map api V3, I defined the origin, destination and some waypoints in DirectionsRequest. However when DirectionsResult came back, DirectionsLeg only started with my origin and ended with my destination, it skipped all my waypoints.
  My codes are shown as below
  Does anyone get the same problem here?</p>
  
  <pre><code>function calcRoute(waypts, mode) {
  var sites = [];
  var mode;
  
  //Add waypoints to array, the first and last one are not added in waypoints
  for (var i = 1; i &lt; waypts.length-2; i++) {
      sites.push({
          location:waypts[i],
          stopover:true}); //Set true to show that stop is required
  }
  
  var request = {
      origin: waypts[0], //Set the first one as origin
      destination:waypts[waypts.length-1],//Set the last one as destination
      waypoints:sites,//Set waypoints
      optimizeWaypoints:false,
      travelMode: google.maps.TravelMode[mode]
  };
  
      //Send to Google
  directionsService.route(request, function(response, status) {
    if (status == google.maps.DirectionsStatus.OK) {
      directionsDisplay.setDirections(response);
      var route = response.routes[0];
      var HTMLContent = "";
  
              //Get response and show on my HTML
      for(var i =0; i &lt; route.legs.length; i++){
          HTMLContent = "From " + route.legs[i].start_address + "To " + route.legs[i].end_address + "&lt;br&gt;";
          HTMLContent =  HTMLContent + "Distance:" + route.legs[i].distance.text + "&lt;br&gt;";
      }       
      $("#route_Scroll").append(HTMLContent);
    }else{
        alert(status);
    }
  });
  </code></pre>
  
  <p>}</p>