GPS Tracking

Hi everyone!
I’d like to create a functionality in my app, to save the route that user does (like Runtastic, Runkeeper, etc). The user clicks on Start, and begins moving, walking, running, driving, and app is registering the movement, using GPS. Then user clicks Stop, and the route is saved. In a screen you can see the log, and if you click on one route, see it in a map (google map, for example). Ionic GPS plugin can save the position, but can it save a route? If I save the GPS position in some time intervals, how can I save it to database, and then put in a map? Or there are other plugins or sdk?


a route is just an array of GPS positions in time, from start to stop… (so you would PUSH a new position onto the array til stop (some timer started at start time, every 10 seconds, or… whatever accuracy you need)

then to save to DB, you need some db that will take variable sized objects

mongo is good at this. (there may be others)…
so you have a route object, which has a name, and an array of GPS points from start to finish.
you might think about saving the time offset from, start, so you can tell on subsequent route if the user is moving faster or slower…(just an idea that changes the data saved)

Hi sdetweil,
this is a good idea, to use an array. I was thinking about Firebase, as I need it to be in the server. But I don’t know if I’ll be able to draw it on a map, in a Google Map, like Runkeeper does.

Thank you for your help!

i don’t know what the route api takes… i think i looked at google maps api at one time that took an array of points for a route

database can be wherever…

1 Like