jamesmontemagno / GeolocatorPlugin

Geolocation plugin for Xamarin and Windows
MIT License
294 stars 158 forks source link

iOS get wrong Location #343

Open Billaehbong opened 3 years ago

Billaehbong commented 3 years ago

Hey everyone,

i have an issue on iOS devices. I think it is an bug on apples side, but maybe you have an idea.

Im using this setup for the locator. And this works fine.

await CrossGeolocator.Current.StartListeningAsync(TimeSpan.FromSeconds(1), 1, true, new Plugin.Geolocator.Abstractions.ListenerSettings { ActivityType = Plugin.Geolocator.Abstractions.ActivityType.Fitness, AllowBackgroundUpdates = false, DeferLocationUpdates = true, DeferralDistanceMeters = 1, DeferralTime = TimeSpan.FromSeconds(1), ListenForSignificantChanges = false, PauseLocationUpdatesAutomatically = false });; CrossGeolocator.Current.PositionChanged += Current_PositionChanged; } catch(Exception ex)

But now i have the following problem:

As you can see in the attachet Video i have sometimes the problem to get a wrong location. First you see my app ReportATree, there you can see the wrong position first. Then i open the Maps app from apple and there you see that the position flys to my actual position. Then i open again ReportATree and you see now the position is correct.

I think the setup below asks for the last known location from the apple device. And this location is sometimes wrong as you can see in the video. On the wrong location i have never been before this day.

Has any one else this problem? Have i made a mistake in the setup?

https://user-images.githubusercontent.com/77233082/110068720-91c2ae80-7d76-11eb-90a5-eb4c7ac751e6.mp4

charmosz commented 3 years ago

Hi. Same problem for me. Did you fix it ?

Billaehbong commented 3 years ago

@charmosz not i didnt. Seems that it is a apple bug. I sended this bug via apple feedback assistent. They would have a profile to see what happens, but i hadn't time for this at the moment.

charmosz commented 3 years ago

Ok. Let me know if you get a fix. Hope that it will come soon in Xamarin Essentials, see https://github.com/xamarin/Essentials/issues/1447