Im working on an Android app which is similar to Waze or Google Maps. I already have a polyline populated by Direction API
Now I need to calculate distance from Marker A to Marker B based on polyline generated
Im assuming that I can calculate the distance by looping the polyline coordinates, but the marker is in the middle of the polyline coordinate. As you can see the distance at the bottom, that is the straight line distance between marker A and marker B which is incorrect.
Does anyone have any idea how can I calculate the distance between Marker A to Marker B based on the polyline generated?
Any help would be great! Thanks! Please ask if you have any question