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 347 forks source link

Problem with moveCamera [Android] #525

Closed HelloMyDevWorld closed 4 years ago

HelloMyDevWorld commented 6 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

Application wait no error appears, during debug cannot step further

HOW TO REPRODUCE

// code for reproduce
         await customMap.MoveCamera(CameraUpdateFactory.NewCameraPosition(
                    new CameraPosition(
                        location.Position,
                        8d
                    )));

Fixed in APP by

            //BUG UWP/ANDROID Two the same queries
            if (Device.RuntimePlatform != Device.Android &&
                Device.RuntimePlatform != Device.iOS)
            {
                await customMap.MoveCamera(CameraUpdateFactory.NewCameraPosition(
                    new CameraPosition(
                        location.Position,
                        8d
                    )));
            }
            else
            {
                customMap.InitialCameraUpdate = CameraUpdateFactory.NewCameraPosition(
                    new CameraPosition(
                        location.Position,
                        8d
                    ));
            }
amay077 commented 6 years ago

Sorry I can't understand. What is expected behavior?

And is your code in page constructor? (InitialCameraUpdate is only for constructor)