Directly assign value, result map itself never show the my location button.
Xamarin.Forms.GoogleMaps = 2.2.0
Your sample solution / on BasicMapPage.xsml.cs / comment out all code
(from the comment marker '// MyLocationButtonEnabled' about line#65 until the end.)
// MyLocationButtonEnabled
switchMyLocationButtonEnabled.Toggled += (sender, e) =>
{
map.UiSettings.MyLocationButtonEnabled = e.Value;
};
switchMyLocationButtonEnabled.IsToggled = map.UiSettings.MyLocationButtonEnabled;
Put on below line of code instead
map.UiSettings.MyLocationButtonEnabled = true;
My result the my location button never show.
Thank you for reporting.
It seems same as #371 .
I will fix it soon. 馃憤
I fixed this issue in v2.2.1-beta1 .
Could you try?
Fixed on Android? I just tested, and it's still not shown.
I can confirm also and even my position is not displayed.
I can see location button on iOS by below code with v2.2.1-beta1 and XFGoogleMapsSample.
public partial class BasicMapPage : ContentPage
{
public BasicMapPage()
{
InitializeComponent();
map.UiSettings.MyLocationButtonEnabled = true;
}
}

A was testing on android emulator and it is not showing with the same code
Thanks. I reproduced it. (I didn't run on Android because this issue is about iOS side)
A was testing on android emulator and it is not showing with the same code
This issue has 2 reasons.
Map.MyLocationEnabled = true and UiSettings.MyLocationButtonEnabled = true for display location button.Map.MyLocationEnabled = true in page constructor is not worked. This is my bug.Add map.MyLocationEnabled = true in your page constructor.
And wait for next version(v2.2.1-beta2).
public partial class BasicMapPage : ContentPage
{
public BasicMapPage()
{
InitializeComponent();
map.MyLocationEnabled = true; // <-- added
map.UiSettings.MyLocationButtonEnabled = true;
}
}
Dear @amay077
thanks for your afford, v2.2.1-beta2 works fine.
I released v2.2.1-beta2.
Could you try this?
@amay077 v2.2.1-beta2 = working fine
Is this bug closed?
Yes, it's closed.
@amay077 last version (2.2.1) MyLocationEabled works in Android but not in iOS (no blue dot, and no certer if you tap in MyLocationButton)