title: Change Google map marker orientation according path direction
body: <p>I'd like to know if it possible to change the marker orientation according the path drawn on the map. Here is a example:</p>
  
  <p><img src="https://i.stack.imgur.com/aKOf1.png" alt="enter image description here"></p>
  
  <p>As you can see the marker is a car (with front bumper and tail lights). I'd like to orientate the car in the direction the path is going (in this exemple orientate the car around 45 degrees to the right).</p>
  
  <p>I'm using <code>DirectionsService</code> to draw the path and I have a random number of point. Sometime only one, sometime 10 points. I'm adding the markers before drawing the paths. Here is how I'm drawing the path:</p>
  
  <pre><code>// Intialize the Path Array
  var path = new google.maps.MVCArray();
  
  // Intialise the Direction Service
  var service = new google.maps.DirectionsService();
  
  // Set the Path Stroke Color
  var poly = new google.maps.Polyline({ map: gmap, strokeColor: '#dd0000' }); // #4986E7
  
  // Draw the path for this vehicle
  for (var i = 0; i &lt; pathPoints.length; i++) {
      if ((i + 1) &lt; pathPoints.length) {
          var src = pathPoints[i];
          var des = pathPoints[i + 1];
          path.push(src);
          poly.setPath(path);
          service.route({
              origin: src,
              destination: des,
              travelMode: google.maps.DirectionsTravelMode.DRIVING
          }, function (result, status) {
              if (status == google.maps.DirectionsStatus.OK) {
                  for (var i = 0, len = result.routes[0].overview_path.length; i &lt; len; i++){
                      path.push(result.routes[0].overview_path[i]);
                  }
              }
          });
      }
  }
  </code></pre>
  
  <p>Is it possible to do that?</p>