0

在我的 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 地图导航?

4

1 回答 1

0

Yandex.Navigator 有一个用于打开应用程序的公共 URL 模式。这是文档(它是俄语的)。

链接如下:

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_0并且lon_via_0用于路线开始后的第一个路线点的坐标(用您的话来说是 B 点)。

如果您需要打开 Yandex.Maps 应用程序,那么您应该使用yandexmaps://maps.yandex.ru/链接。更多关于它的信息

于 2017-12-19T14:14:47.333 回答