title: How to show duration trip in google map api
body: <p>I'm using google map API to show the distance betewenn to points depending on the transportation and I like to show the duration of the trip like in the google map site (see the image). I'm using the v3 of google map and also the DirectionsRenderer function:</p>
  
  <p>so far:</p>
  
  <pre><code>self.renderDirections = function (directions, status) {
          self.cleanDisplayedDirections();
          for (var i = 0, len = directions.routes.length; i &lt; len &amp;&amp; i &lt; 3; i++) {
              var direction = new google.maps.DirectionsRenderer({
                  map: map,
                  directions: directions,
                  routeIndex: i,
                  draggable: true,
                  suppressInfoWindows: false,
                  suppressMarkers: true
              });
              displayedDirections.push(direction);
          }
      };
  </code></pre>
  
  <p>Like in the image I would like to show, for instance, that is 13 min for the walk of 1 km. </p>
  
  <p>Also, it is possible to change the polylineOptions for one route to be "dotted" like in the image?</p>
  
  <p><a href="https://i.stack.imgur.com/nrP73.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nrP73.png" alt="enter image description here"></a></p>