問題描述
如何使用 google map api v3 激活基于語音的方向?我已經實現了從起點到終點給出方向的地圖.但現在我想聽聽我當前所在位置的名稱.請幫忙 ?我在 ios UIWebView 中實現了它,所以我從 GPS 獲取當前位置.現在我每 2 秒更新一次,但我想添加基于語音的方向.這怎么可能?請幫忙
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
推薦答案
如果您使用 Google Directions API 接收路線,您會以 JSON 格式接收路線,其中包括路線點、路線長度、預期的持續時間行程和說明.您可以獲取它們,然后在需要時使用文本轉語音從特定指令中發出聲音.
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.
這篇關于谷歌地圖api中可以進行語音導航嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!