6

How to I activate voice based directions using google map api v3? I already implemented the maps which give directions from start to end points. But now I want to hear the name of my current location . Please help ? I have it implemented in ios UIWebView so I am getting the current location from GPS. Now I update it every 2 sec, but I wana add voice based directions. How is it possible? Please help

Faizan Haroon
  • 107
  • 2
  • 9
  • I do not think that `google map api v3` supports it, try to see this site: [Capturing Audio & Video in HTML5](http://www.html5rocks.com/en/tutorials/getusermedia/intro/) – Hodaya Shalom Mar 19 '13 at 10:17
  • I think your question should be Is it possible to make a sound by sending word through the JS, then you can send the address by Geocoding. – Hodaya Shalom Mar 19 '13 at 10:25

2 Answers2

4

If you're using Google Directions API for receiving directions, you receive them in JSON format which includes the route points, the route length, the expected duration of the trip and the instructions. You can get them and then use text-to-speech to make sound out of the particular instruction when it's time for it.

WWJD
  • 1,104
  • 4
  • 12
  • 31
  • are we allowed to do that, does it violates Google privacy policy or not? – Syed Raza Mehdi Apr 23 '14 at 07:38
  • 1
    Good question. Here's what the Google Maps Terms for Service are saying: `https://developers.google.com/maps/terms` . Look at 10.2. Yesterday I read it and now I'm not yet sure if my way is violating Google's T&C. – WWJD Apr 23 '14 at 07:40
  • as per the statements i think it is not allowed, but i am still not sure sir – Syed Raza Mehdi Apr 23 '14 at 09:13
  • @SyedRazaMehdi Me too! I asked in the Google contributors forum but they couldn't tell me anything too: [link](https://productforums.google.com/forum/#!topic/maps/KYPuEK3TUqU) – WWJD Apr 23 '14 at 12:30
  • I ll just post to confirm that after doing research on their privacy policy i can support the claim made by Syed, as you may not use certain features in the API for any standalone application. More here [link](http://stackoverflow.com/questions/24531391/is-it-possible-to-create-turn-by-turn-gps-navigation-app-on-android-using-google/26231295#26231295) – Tushar Oct 09 '14 at 06:26
1

According to the Google Maps Terms

No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control.

The recommended way is to redirect the user to the Android app or Web App of Google Maps using Intents.

If you really want to do it, you may choose other Maps services such as HERE maps. They do provide the Turn by turn navigation support inside your app. I have never used it though.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184