ExternalMaps

外部地图插件打开外部地图以导航到特定的地理位置或地址。也可以选择在 iOS 上使用导航选项启动。

可在 NuGet 上找到:[ https://www.nuget.org/packages/Xam.Plugin.ExternalMaps/] [1 ]

XAML

  <StackLayout Spacing="10" Padding="10">
      <Button x:Name="navigateAddress" Text="Navigate to Address"/>
      <Button x:Name="navigateLatLong" Text="Navigate to Lat|Long"/>
      <Label Text=""/>
     
    </StackLayout>

namespace PluginDemo
{
    public partial class ExternalMaps : ContentPage
    {
        public ExternalMaps()
        {
            InitializeComponent();
            navigateLatLong.Clicked += (sender, args) =>
            {
                CrossExternalMaps.Current.NavigateTo("Space Needle", 47.6204, -122.3491);
            };

            navigateAddress.Clicked += (sender, args) =>
            {
                CrossExternalMaps.Current.NavigateTo("Xamarin", "394 pacific ave.", "San Francisco", "CA", "94111", "USA", "USA");
            };
        }
    }
}