Xamarin Android Map with location button don't follow user

662 views Asked by At

I have the following problem:

I have a master detail page in Xamarin forms and on it I have a map that is rendered by a custom renderer in Xamarin droid. The map works great and no problem here. My code is 100% equals to this:

When I use this:

NativeMap.MyLocationEnabled = true;

The location button appears and when I click it the camera move to my position, it's ok, but this button doesn't becomes blue on click (remains gray) and then the map don't follow the user when it change position.

Here's my code:

public void OnMapReady(GoogleMap googleMap)
{
    NativeMap = googleMap;
    NativeMap.MyLocationEnabled = true;
    //NativeMap.InfoWindowClick += OnInfoWindowClick;
    NativeMap.SetInfoWindowAdapter(this);
    NativeMap.UiSettings.ZoomControlsEnabled = Map.HasZoomEnabled;
    NativeMap.UiSettings.ZoomGesturesEnabled = Map.HasZoomEnabled;
    NativeMap.UiSettings.ScrollGesturesEnabled = Map.HasScrollEnabled;
}

Is there a way to enable this feature or must to do it manually?

Thank so much to all!

0

There are 0 answers