【问题标题】:Multiple points on same routes with Google-yandex Maps navigation使用 Google-yandex 地图导航在同一路线上的多个点
【发布时间】:2018-05-16 14:54:36
【问题描述】:

在我的 html 应用程序中,用户想要在 google 或 yandex 导航中导航一个点

//geoURL='geo:'+originLat+','+originLot+'q='+DestinationLat+','+DestinationLong;
            var geoURL='maps://?q='+DestinationLat+','+DestinationLong;
             window.open(geoURL,'_blank');

我使用该代码执行此操作。因此,当用户单击任何产品以导航我的应用程序时,导航到 google 或 yandex 导航并开始导航...但是如何将其用于多个点?例如,我的用户首先想去点 A,然后点 B,最后点 C...如何使用这 3 点打开 google 或 yandex 地图导航?

【问题讨论】:

标签: javascript google-maps google-maps-api-3 google-maps-android-api-2 yandex-maps


【解决方案1】:

Yandex.Navigator 具有用于打开应用程序的公共 URL 架构。这里是the documentation(是俄语)。

链接如下:

yandexnavi://build_route_on_map?lat_from=55.75&lon_from=37.58&lat_to=55.75&lon_to=37.64&lat_via_0=55.75&lon_via_0=37.62

lat_via_0lon_via_0 用于路线开始后的第一个路线点的坐标(用您的话来说是 B 点)。

如果您需要打开 Yandex.Maps 应用程序,则应使用 yandexmaps://maps.yandex.ru/ 链接。 More about it here.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-03
    • 1970-01-01
    • 2021-03-15
    相关资源
    最近更新 更多