amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 346 forks source link

UWP Crashes when opening Map #590

Open ThomasAunvik opened 5 years ago

ThomasAunvik commented 5 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

Launching App, open Map, crash. For XFGoogleMapSample: Start UWP App, and open the Simple Map

ACTUAL SCREENSHOTS/STACKTRACE

image

External component has thrown an exception.
at Windows.UI.Xaml.Controls.Maps.MapControl.put_MapServiceToken(String value)
at Xamarin.Forms.GoogleMaps.UWP.MapRenderer.<OnElementChanged>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()

EXPECTED BEHAVIOR

Open Maps just almost like in android.

HOW TO REPRODUCE

  1. Clone Git
  2. Edit Bing API Key in https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/4ab24797821e19768ebf89baa5c6896d4977f0af/XFGoogleMapSample/UWP/App.xaml.cs#L67 (Variables.BING_MAPS_UWP_API_KEY does not exist)
  3. Run
  4. Open Map
sergio4anso commented 5 years ago

I think your api key is not correct. make sure you have put a correct BING map key (https://www.bingmapsportal.com) and when you make the key, be sure that you select the Key type to Windows Application.