Xamarin.forms.googlemaps: Issue Android map.MoveToRegion() zoom not working when animate parameter is true

Created on 25 Sep 2016  路  5Comments  路  Source: amay077/Xamarin.Forms.GoogleMaps

Hi, i report this issue with a sample code to reproduce the bug:

map.SelectedPinChanged += (sender, e) =>
{
    if (e.SelectedPin != null)
    {
        var latitude = e.SelectedPin.Position.Latitude;
        var longitude = e.SelectedPin.Position.Longitude;
        map.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(latitude, longitude),  Distance.FromKilometers(1 or whatever)));
    }
};
bug

All 5 comments

I reproduced it too.

It is conflicts MoveToRegion and Google Maps API's default behavior.

I should implement return true in OnMarkerClickListener.onMarkerClick.
I will provide SelectedPinChangedEventArgs.Handled property probably.

You will can set SelectedPinChangedEventArgs.Handled = true then disable Google Maps API's default behavior.

Hi @dreamsystems,

I deployed 1.7.0-beta1 what provides solution for this issue.

You can subscribe Map.PinClicked event and set PinClickEventArgs.Handled to true.
If PinClickEventArgs.Handled is true then pin selection doesn't work automatically.
So you can write your own operation to Map and Pin.

Could you try 1.7.0-beta1 and XFGoogleMapSample.

Hi, thanks ! I will give a try.

It works well on Android and iOS. The callout is disabled whene.Handled is true and at the same time, this boolean is used as a checker to do or not the operations.

Thanks @dreamsystems ,

I will make stable version soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JKennedy24 picture JKennedy24  路  6Comments

LukasThijs picture LukasThijs  路  7Comments

mtsrdr picture mtsrdr  路  6Comments

talhaa91 picture talhaa91  路  4Comments

ViktorBylbas picture ViktorBylbas  路  4Comments