Voice navigation possible in google map api?

梦想与她 提交于 2019-12-07 06:26:57

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/15496392/voice-navigation-possible-in-google-map-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!