iOS – 使用路线URLScheme启动YandexMaps

iOS – 使用路线URLScheme启动YandexMaps,第1张

概述是否有一个URL-Scheme用于启动带有路线的Yandex地图应用程序? 我可以使用几行代码启动Yandex Maps应用程序(如果已安装),但我没有找到有关应用程序处理的URLSchemes的文档: NSURL *url = [NSURL URLWithString:@"yandexmaps://maps.yandex.ru/"];if([[UIApplication sharedAppl 是否有一个URL-Scheme用于启动带有路线的Yandex地图应用程序?
我可以使用几行代码启动Yandex Maps应用程序(如果已安装),但我没有找到有关应用程序处理的URLSchemes的文档:

NSURL *url = [NSURL URLWithString:@"yandexmaps://maps.yandex.ru/"];if([[UIApplication sharedApplication] canopenURL:url]){    [[UIApplication sharedApplication] openURL:url];}
解决方法 实际上,截至今天这是误导性的,有一个URL方案来获取方向.

yandexmaps:// build_route_on_map / ParaMS

例:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"yandexmaps://build_route_on_map/?lat_from=59.967870&lon_from=30.242658&lat_to=59.898495&lon_to=30.299559"]];

lat_from和lon_from是可选的,当没有提供它们时使用当前位置.
不要忘记检查是否安装了yandex.maps应用程序

NSURL *callUrl = [NSURL URLWithString:@"yandexmaps://"];if ([[UIApplication sharedApplication] canopenURL:callUrl]){    //Yandex.Maps app is installed}

Documentation(俄文)

总结

以上是内存溢出为你收集整理的iOS – 使用路线URLScheme启动YandexMaps全部内容,希望文章能够帮你解决iOS – 使用路线URLScheme启动YandexMaps所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1008488.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存