如何修复警告:未指定地图服务令牌
How to fix Warning: map service token not specified
我正在 Xamarin 中开发一个使用地图的应用程序。
该地图似乎工作正常,因为它确实显示了我的位置,但它一直在地图下方显示我 "warning map service token not specified"。
Api 密钥类型为 basic/UWP 并且已启用。
我把 Api 键放在 MainPage.xaml.cs
public MainPage()
{
Xamarin.FormsMaps.Init("myApiKey");
this.InitializeComponent();
LoadApplication(new BarApp.App());
}
而且我还在 Package.appxmanifest
中检查了 "Location"
我没有收到其他错误,其他一切似乎都工作正常,所以我真的很困惑可能是什么问题:/
提前致谢! (:
-耶伦
我使用的解释:https://developer.xamarin.com/guides/xamarin-forms/user-interface/map/
The map seems to work fine because it does show my location, but it keeps showing me "warning map service token not specified"
本机 MapControl
is BingMap
in UWP platform. According to Request a maps authentication key, Your Universal Windows app must be authenticated before it can use the MapControl
and map services in the Windows.Services.Maps namespace
. The authentication key in Xamarin official code sample was expired. You could request a new maps authentication key from the Bing Maps Developer Center 并将其添加到您的应用程序。
我正在 Xamarin 中开发一个使用地图的应用程序。 该地图似乎工作正常,因为它确实显示了我的位置,但它一直在地图下方显示我 "warning map service token not specified"。
Api 密钥类型为 basic/UWP 并且已启用。 我把 Api 键放在 MainPage.xaml.cs
public MainPage()
{
Xamarin.FormsMaps.Init("myApiKey");
this.InitializeComponent();
LoadApplication(new BarApp.App());
}
而且我还在 Package.appxmanifest
中检查了 "Location"我没有收到其他错误,其他一切似乎都工作正常,所以我真的很困惑可能是什么问题:/
提前致谢! (:
-耶伦
我使用的解释:https://developer.xamarin.com/guides/xamarin-forms/user-interface/map/
The map seems to work fine because it does show my location, but it keeps showing me "warning map service token not specified"
本机 MapControl
is BingMap
in UWP platform. According to Request a maps authentication key, Your Universal Windows app must be authenticated before it can use the MapControl
and map services in the Windows.Services.Maps namespace
. The authentication key in Xamarin official code sample was expired. You could request a new maps authentication key from the Bing Maps Developer Center 并将其添加到您的应用程序。