Throw back distance between source and destination at runtime


Source1 - My current location
Destination1 - First waypoint in routes list

In RouteList I’hv 10 wayspoints.

Problem Statement - While navigating and I want to get the distance between the source and destination at runtime as a toast so that I can see the distance continuously on map .
I want to display an alert dialogue if distance is less then 50m before we reaching the each waypoints.

Current I was checking the NavigationEventDispatcher class for the method MileStone in mapbox sdk.