How to record google map route and save it?

i want to build app that saves route, its not mattar which one - car, bike, walk… just record it.
i searched and found only how to put markers…
please help me with that.
i know that need to use gps and google map component
also if somehow i can show gpx file it will be great.

You can save locations in a database and use them later to create a route

You might be interested in the locationservice extension