Apple 地图在 Xamarin 中提供概览而不是逐向导航

Apple maps gives an overview instead of turn-by-turn navigation in Xamarin

我正在使用下面的 url 打开苹果地图并开始导航。

http://maps.apple.com/?saddr={currentPosLatitude},{currentPosLongitude}&daddr={destinationPosLatitude},{destinationPosLongitude}

目前打开苹果地图并显示方向。但是当我们点击 Go 时,它会显示概览而不是逐向导航。我怎样才能做到这一点?

更新:要获得转弯指示,请不要提供起始地址,只提供目的地地址,所以试试这个 url:

http://maps.apple.com/?daddr={destinationPosLatitude},{destinationPosLongitude}

这对我来说很有效,可以让语音引导转弯方向。在我看来,通过提供起始地址,地图假定您不在那里。因此,“起点”点必须是您当前所在的位置,才能获得语音指导。通过在打开地图的 url 中保留起始地址,您是在告诉它使用当前位置作为起点,从而能够获得转弯指示。

原回答:

This works on my end. Tested by opening your url (with set start and end positions) in a Xamarin.Forms WebView, which immediately launches the Apple Maps app, as expected. After clicking the Go button, I have to swipe at the top to see each step in the directions though.

Screencast: https://screencast.com/t/KQPuENdSWQ

Are you sure that the positions you are passing in can be resolved to actual addresses? As a test, I put in a position in the middle of the ocean and got a message that "Directions are not available to this destination."

And this has nothing to do with Xamarin. Once you open that url, you are in the Apple Maps app and outside of any influence of Xamarin. All xamarin is doing is opening the Apple Maps app with the url that has the start and end addresses/positions.