gpt4 book ai didi

ios - 从 native 应用程序启动时,Apple map 显示 "directions not available"

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:21:50 25 4
gpt4 key购买 nike

我构建了一个 react native 应用程序,我在其中使用 map 显示某些位置。我在 map 上为每个位置标记了图钉。现在我希望如果用户选择一个标记并单击导航按钮(我在 map 上提供)它应该启动苹果 map (对于 ios)和谷歌地图(对于安卓)并显示从用户当前位置到经纬度的导航我已经传入了 map url。

但在苹果 map 上它总是显示“方向不可用”的消息。

下面是我调用 map url 进行导航的方式:

Platform.select({
ios: () => {
Linking.openURL('http://maps.apple.com/maps?daddr='+latitude+','+longitude+'&dirflg=d&t=m');

},
android: () => {
Linking.openURL('http://maps.google.com/maps?daddr=' +latitude+ ',' +longitude);
}
})();

enter image description here

谁能帮帮我..

谢谢

最佳答案

目前路线功能在印度不可用,因为这张 map 没有向您显示路线。你必须使用谷歌地图。

如需更多说明,请点击此链接

https://www.apple.com/in/ios/feature-availability/#maps-directions

此链接显示哪个功能在哪个国家/地区可用。

关于ios - 从 native 应用程序启动时,Apple map 显示 "directions not available",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47808584/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com