-
Notifications
You must be signed in to change notification settings - Fork 24
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
Routing information update as you move #376
Comments
Unfortunately that functionality is not currently available in the iOS SDK. However we are actively working on it and it should be ready later this quarter. It is possible to do manually however, and not super involved. Basically you would need to setup Core Location and receive location updates, and pass them into a routing engine that would then need a number of milestone checks. We do have this functionality in Android currently, so you can base your system's logic off of that if you decide you want to go at this yourself. Take a look here https://github.com/mapzen/on-the-road_android/blob/master/library/src/main/java/com/mapzen/helpers/RouteEngine.java#L50 |
Thank you Matt. I already have the location updates but the routing engine in the Mapzen-ios-sdk does not seem to have any function similar to the ones for Android (I don't fully understand what you mean by milestone checks). FYI, it seems to be possible to access "intersection coordinates" in the iOS sdk by using |
That's correct. Per my above response: Unfortunately that functionality is not currently available in the iOS SDK. However we are actively working on it and it should be ready later this quarter. It is possible to do manually however, and not super involved. |
Milestone checks is one of the things you would need to implement. The Android implementation has examples of that (2 miles away, 1 mile away, etc.) |
The |
Right, I already have implemented the milestone checks in my code but what is missing is the function that get the distance to the next instruction. To be more precise, only the coordinate of the intersection that corresponds to the next instruction is needed (I also already implemented a function that compute the distance to the next intersection). |
Let me know if you need more explanation on the issue ;) |
Not to sound repetitive, but you should take a look at the Android code if you want to replicate that kind of functionality now. We're actively working on adding it to iOS but it won't be until later this quarter. |
I understood what you wrote and I did look at the Android code. Unfortunately, the function that I need is the function
as you said but it seems like it is impossible at the moment without the coordinates of the intersections coresponding to the instructions. |
Finally getting back around to this (sorry about that). I'm not sure I'm fully understanding the issue. You receive back from Valhalla a list of maneuvers and voice instructions for those maneuvers. Each maneuver will correspond (roughly) to an intersection of a road. Is this not what you're looking for? |
I don't understand what is so difficult about my inquiry (which I kind of fixed but it is not perfect). |
For 3 maneuvers (turn left, turn right, turn left), I would expect 3 coordinates. |
Ah, ok this is slightly different than the original request. That's why I was clarifying. You are correct in that we don't expose raw GPS lat/longs directly in the Thanks for taking the time to explain it. |
In the mean time, if you wanted to attempt to do it yourself, you could manually connect to Mapzen's turn by turn servers, retrieve the response, and then parse it using the available objects in our On The Road library. Once you get to the point you have the leg manuevers, you can use the |
That has always been my one and only request ;) Thank you for taking the time to reply anyway. I already do have a way of doing it now manually but looking forward to seeing the option added to the ongoing work! |
Description
I use the routing function in the SDK to get turn-by-turn information. By printing leg.maneuvers, I get all the maneuvers of the route ("turn right in 100m", "turn left in 50m") at once but no information on the coordinates from which I should consider them.
Is there a way of comparing your GPS location with the intersection coordinate so that you know you should use the right maneuver instruction?
Any help on this issue is welcome!
The text was updated successfully, but these errors were encountered: