Here is a way to calculate total distance shown if you use a LineString.
The complete linestring distance app