How can I show shortest path in my code like it is in the picture?
I'm using this code to find shortest distance between two points.
Location locationA = new Location("point A");
locationA.setLatitude(lat);
locationA.setLongitude(long);
Location locationB = new Location("point B");
locationB.setLatitude(lat);
locationB.setLongitude(long);
distance = locationA.distanceTo(locationB);