从本机应用程序启动时,Apple 地图显示 "directions not available"

Apple maps shows "directions not available" when launched from react-native app

我构建了一个反应本机应用程序,我在其中使用地图显示某些位置。我在地图上为每个位置标记了图钉。现在我希望如果用户 select 一个标记并单击导航按钮(我在地图上提供)它应该启动苹果地图(对于 ios)和 google 地图(对于 android) 并显示从用户当前位置到我在地图中传递的纬度和经度的导航 url.

但在苹果地图上它总是显示 "direction not available" 消息。

下面是我调用地图 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);
      }
  })();

谁能帮帮我..

谢谢

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

如需更多说明,请遵循此 link

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

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