amay077 / Xamarin.Forms.GoogleMaps

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

MyLocation Click #792

Open andrewD123 opened 1 year ago

andrewD123 commented 1 year ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

When clicking on the sample basic map clicking on my location I get Java.Lang.SecurityException: 'my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION'

image

HOW TO REPRODUCE

run sample app on Android 12.

amay077 commented 1 year ago

You should implement "Runtime Permission" for location.

Latest sample apps implements here:

https://github.com/amay077/Xamarin.Forms.GoogleMaps/blob/7012ef21c483967a23c12780eac22de54170df8b/XFGoogleMapSample/XFGoogleMapSample/BasicMapPage.xaml.cs#L32-L41