I'm having a hard time trying to show a map on my Xamarin Forms UWP app. This is the error I get every time I open the page with the map:
The exception:
Exception {System.Runtime.InteropServices.COMException (0x80004005):
Error HRESULT E_FAIL has been returned from a call to a COM component.}
System.Exception {System.Runtime.InteropServices.COMException}
Error code: -2147467259
Message: "Error HRESULT E_FAIL has been returned from a call to a COM component." string
In the file MainPage.cs the project UWP I have the next code:
In the MainPage.cs file of the UWP project I have the following code:
Xamarin.FormsMaps.Init ("API KEY");
LoadApplication(new Shopm.App());
The API key is Bing Maps. The API key that I created is with Type of key: Basic / Other public mobile application. It is right?
Only three options appear for creating an API KEY.
I followed the steps of the Xamarin.Forms page.
In Android its works but in UWP when clicking on a button for maps breaks my app.
For UWP the correct selection is that:
Application type: Select Universal Windows App for use in your Universal Windows app..
This is an example of what the form looks like.
Follow the steps on this Documentation: https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/authentication-key
User contributions licensed under CC BY-SA 3.0