title: How to show the path and distance on Google Map - Xamarin
body: <p>I have a page(fragment) that shows google maps together with 1 marker icon. So now i would like to pass source and destination coordinates to this map so that it can show the shortest route together with the distance in Km. E.g i want the map to show the blue path in the image below :</p>
  
  <p><a href="https://i.stack.imgur.com/UvBdE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UvBdE.jpg" alt="enter image description here"></a></p>
  
  <p>Here is my code :</p>
  
  <pre><code>private void SetUpMap()
   {
         if (GMap == null)
         {
             ChildFragmentManager.FindFragmentById&lt;MapFragment&gt;(Resource.Id.googlemap).GetMapAsync(this);
          }
   }
  
  public void OnMapReady(GoogleMap googleMap)
  {
  
                  this.GMap = googleMap;
                  GMap.UiSettings.ZoomControlsEnabled = true;
  
                  LatLng latlng = new LatLng(Convert.ToDouble(gpsLatitude), Convert.ToDouble(gpsLongitude));
                  CameraUpdate camera = CameraUpdateFactory.NewLatLngZoom(latlng, 15);
                  GMap.MoveCamera(camera);
  
                  MarkerOptions options = new MarkerOptions()
                             .SetPosition(latlng)
                             .SetTitle("Chennai");
  
                  GMap.AddMarker(options);
  }
  </code></pre>