Use google navigation within app?
Is there a way to embed the google navigation app within my Titanium app? Or at the very least, is there a way to launch google navigation from my app and pass in an address that it will start navigating to?
Basically I'm trying to create an app where it has a list of addresses and the user can click on one and it will start giving them turn by turn directions to that address.
4 Answers
-
Accepted Answer
It's actually very easy, just use the following:
Ti.Platform.openURL('http://maps.google.com/maps?t=m&saddr=' + sourceAddress + '&daddr=' + destinationAddress);
The address can be a comma separated Lat/Lng or a real address. I use Lat,Lng for source address and a real address for the destination.
* This will open in Safari using the Simulator and will open in the Maps application on the phone.
-
Justin
You will need to use the Titanium API to retrieve and process requests to the Google Directions API.
It's certainly an achievable task.
Hal
-
Probably just use the openurl (maps://) or something?
-
Yo Shaun,
Is there a way to parse and show "just the driving directions from point A to point B" from google maps api navigation onto our android titanium application w/o showing the other features from the api?
-Kevin