The
ol.control.GeolocationBar is an
ol.control.Bar
with a LineString
ol.interaction.GeolocationDraw interaction.
It is specially designed to record GPS tracks on mobile.
You can activate the location, start recording a track, pause and restart, then stop by click on the track button.