No example in a tutorial Jose. There are several ways that could be done.
You need a global variable to store total distance traveled as a running total.. Initially set it to 0.
When your LocationChanged event fires, record the new coordinates and calculate the distance between the start and the new. You can calculate the distance either using Blocks and a Great Circle Algorithm or using other techniques. Simplest is to calculate and store the distance in meters. At the next LocationChanged event, add that distance to the totalDistance (or meters or km or miles). and so on. When you finish, add the final distance to the List of distances. Only then total the distance (in meters or miles or km.); convert to miles to avoid intermediate calculations and you are done. Alternatively, store all the latitude/longitude coordinate pairs in a List. When you are 'done', calculate the distances between coordinates, one at a time and place the values in a List of distances. Next, total all the distances in the List. What works better? I don't know. What would be best is determined by how you would use the app to measure distance, how frequently you sample etc.
It is also possible to calculate distance between two points using a block in the Map Marker component ( call Marker.DistanceToPoint ...latitude longitude; it provides a distance in meters ) .
What have you coded so far Jose?
There are other ways of doing an app to make a running total of distance traveled. Coding r something like described is relatively simple. Why not try it? How to use the LocationSensor is described in
Using the Location Sensor in detail.
Here is a tutorial that shows some of what you might want to eventually do
App Inventor GPS Trak Basics . It posts a Marker on a map either using a timer or on demand.or using the LocationChanged block ( if I remember correctly)..adapt it to making the distance calculation?
Regards,
Steve