title: how to rotate google map marker to road direction
body: <p>I want to rotate marker icon to road direction, as you can see in image it only just placed but its not rotated to road direction.. i've tried below code as far</p>
  
  <pre><code>double lat = 19.205681
  double lon = 72.871742
  loc.setLatitude(lat);
  loc.setLongitude(lon);
  Location newLoc = new Location("service Provider");
  newLoc.setLongitude(lat);
  newLoc.setLongitude(lon);
  map.addMarker(new MarkerOptions()
      .position(new LatLng(data.getLat(),data.getLon()))
      .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_pandu_car))
      .anchor(0.5f,0.5f)
      .rotation(loc.bearingTo(newLoc))
      .flat(true));
  </code></pre>
  
  <p>Note: marker have individual location (ofcource) i dont want to show from-to location bearing ...only individual marker to face on road direction</p>
  
  <p>Thanks you 
  <a href="https://i.stack.imgur.com/gOJbF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gOJbF.png" alt="enter image description here"></a></p>
  
  <p>UPDATE:i wanna set my marker (car) like this Ola app</p>
  
  <p><a href="https://i.stack.imgur.com/rHtpP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rHtpP.png" alt="enter image description here"></a></p>