I would like to create a navigation application, with mapquest sdk for android, that gives real time turn by turn directions using GPS after a route is created, like when you start a navigation on google maps on button press. Is it possible to implement the feature using just the mapquest sdk or would I require any other api.
Say if there was a possibility, then, is there a way to extract that guidance('turn left/right') cue and use it with in the program?
Yes, it is possible. I'm currently developing my Bachelor Thesis (a mobile navigation service) with the MapQuest API for Android. So as soon as I submitted it I can offer you the source code, too (will be in about a month). However, I can give you some help of course though.
Here is a nice tutorial from MapQuest of how to implement the route functionality. This is not a real time turn by turn guidance but gives you a first impression where to begin!
You can get all instructions from MapQuest here.
If you prefer another API to display the map this is not a problem as the guidance includes all shape points of the route. I chose the MapQuest API for this though as it is a bit easier to display the map for a first glance. However, I recommend you to draw the route yourself on the map though because the implemented method does not always work properly.
Hope I could help you with that and if you are willing to wait a month, I will post here the link to my GitHub repository with the source code.
Best, Marius
EDIT:
So I submitted my work and can now give you access to my source code. You find my GitHub repository here.
I think the function getGuidance()
in the NaviActivity
will be a good starting point for your application. It calls the guidance information from MapQuest and converts the information into a JSONObject. The Route
class then grabs the required information and sorts them in arrays.
I hope that this will help you with your application. For further questions do not hesitate to ask :)
Best, Marius
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With