My wife and I use Map My ride for this. It costs about 10% of the battery per hour, so it should be fine for 2-4 hour rides. Alternately, if you buy a Garmin, it will offer live tracking for far less battery use.
__________________
Formerly fastest rider in the grupetto, currently slowest guy in the peloton
