Collect Route Held GPS - Maps

Asked

Viewed 313 times

1

Guys, here’s the thing, I’m looking to make an app that will display to the user the route he made, the distance of the route he traveled and the average speed...

My question is, what’s the best way I could do that? I’ve been observing today has several applications in the market that does this, for example, the person will run and at the end shows all this data, at first this is what I need...

The problem is where do I start? I will be using Cordova for development, using the Geolocation feature I have the GPS data, but how would I save the path that person did? And the other data?

I tried to google something but the problem I don’t even know where to start.... Hahaha.

1 answer

1

For an app that uses routes, the google API is essential. For the other features here are some ideas:

  • If the system will show the user the average speed, you could make a function that every time X picked up the speed at which user is and in the end run a simple average.
  • To save the path you can save in the bank the Latitude and Longitude of the starting point and the end point.
  • To calculate the distance of the points, you can perform the mathematical formula of Haversine, which serves to calculate the distance of two points on a sphere from longitude and latitude. Here

Before thinking about the functions of a studied Google API that can be quite complex, not to mention the prices $$. In addition it is worth taking a look at the services of Broadcasting, after all the application will make updates in real time.

Recommendations:

  • Keys to the google api: Maplink
  • Service for real-time applications: Pusher

Hugs...

  • Opá, all right Drealler? Thanks for the north! I was researching and I found something from Google Api Matrix that makes some bids of these that I need, but I need to map the route that the guy did, example, the guy will come out of point A, he will walk and then will go back to point A again, the path that he did, The places he passed, I need to show off. I was observing that I could save the Lat/Lng in X time but I could not understand yet this Google Matrix api, I’m taking a look, but before-hand thanks for the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.