【问题标题】:Google Maps sdk with voice navigation direction in IOS?IOS中带有语音导航方向的Google Maps sdk?
【发布时间】:2013-08-22 10:13:57
【问题描述】:

我一直在阅读适用于 iOS 的 Google Maps SDK 的文档,但我没有在地图上看到任何有关语音导航方向和路线的信息。

有人知道吗?

【问题讨论】:

    标签: ios google-maps-sdk-ios


    【解决方案1】:

    我更正了我之前的答案,这是可能的。您使用此链接中概述的 google 路线 API:

    您发送您的方向请求,它会根据您的偏好以 json 或 xml 格式返回方向。为您提供路线上每个点的坐标。

    您向http://maps.googleapis.com/maps/api/directions/outputformat?parameters发送请求

    因此,如果您想以 json 格式返回路线,请求将是:

    http://maps.googleapis.com/maps/api/directions/json?origin=ORIGIN_LOCATION&destination=DESTINATION_LOCATION&sensor=FALSE

    ORIGIN_LOCATIONDESTINATION_LOCATION 可以是用逗号分隔的纬度和经度,例如latitude,longitude 或位置搜索字符串,例如 Eiffel+Tower+,+Paris+France(搜索字符串必须是 url 编码的)。

    sensor 参数是另一个强制参数,询问发送请求的设备是否可以检测到自己的位置。

    例如,从埃菲尔铁塔到卢浮宫博物馆的路线以 json 格式在以下链接中给出:

    http://maps.googleapis.com/maps/api/directions/json?origin=Louver+museum+Paris&destination=Eiffel+Tower+Paris+France&sensor=false

    并将其作为 XML 返回:

    http://maps.googleapis.com/maps/api/directions/xml?origin=Louver+museum+Paris&destination=Eiffel+Tower+Paris+France&sensor=false

    【讨论】:

    • Google Maps for iOS 是无限查询。 API 路线请求属于哪个域?
    • 我用更多细节编辑了我的答案,更多信息可以在谷歌文档中找到:developers.google.com/maps/documentation/directions/…
    • @cris 这有帮助吗?如果是这样,您可以将其标记为答案。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2012-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-11
    • 1970-01-01
    • 1970-01-01
    • 2015-04-12
    相关资源
    最近更新 更多