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