Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance duratoin #79

Open
iBasit opened this issue Jan 13, 2016 · 4 comments
Open

Distance duratoin #79

iBasit opened this issue Jan 13, 2016 · 4 comments
Labels

Comments

@iBasit
Copy link

iBasit commented Jan 13, 2016

Is there a way to get the distance duration like https://developers.google.com/maps/documentation/distance-matrix/intro?hl=en

"duration": {
        "value": 24487,
        "text": "6 hours 48 minutes"
      }
@toin0u
Copy link
Member

toin0u commented Jan 23, 2016

Hi @iBasit - it's could be interesting to have it :) But I don't know it could be implemented smoothly yet. Any ideas are welcome!

@toin0u toin0u added the feature label Jan 23, 2016
@iBasit
Copy link
Author

iBasit commented Jan 23, 2016

I did few rough estimate and then calculate with google api for distance calculation, so far it was minute up or exact (if round it), which is not big difference.

It wont be perfect solution, but it can be initial start.

Solution:

If distance by km is not far away, then calculate 30 miles per hour (which is car speed).

If distance is far away after certain km range, then calculation should be 60 miles per hour.

value: is seconds values
text: is the days, hours, minutes in words. (not seconds)

Something on note:
the above calculation does not calculate roads length and speed limit (unless we know how to get that), then it will make it more perfect.

@toin0u
Copy link
Member

toin0u commented Jan 25, 2016

@iBasit Maybe we can use the API instead?

@iBasit
Copy link
Author

iBasit commented Jan 27, 2016

Yes Google API is good for one time call on each location, but if you were building taxi app or similar app. Then checking every 30 secs for all the thousands or 100 thousands of cars will put lots of requests.

It would not be good idea for some, but for some it will solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants