jamesmontemagno / GeolocatorPlugin

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

Facing issue with Accuracy #331

Open kavitap810 opened 4 years ago

kavitap810 commented 4 years ago

Bug Information

Version Number of Plugin: 4.5.0.6 Device Tested On IOS Iphone XR, Android Moto G5+ and Windows surface pro laptop Version of VS: Visual Studio for Mac version 8.7 ( build 2037) Version of Xamarin: XF version 4.7.0.11179

Steps to reproduce the Behavior

After this, start getting the location coordinates, but the accuracy ( in meters) is coming very high. Also, for the same location, it is giving different coordinates, as the accuracy(in meters) is coming high.

Expected Behavior

  1. Accuracy should be equal or near to the Desired Accuracy set.
  2. For the same location, the same coordinates should come.
  3. With setting DeferralDistanceMeters to 3 feet, the location should be obtained when there is a distance of 3 feet between coordinates

Actual Behavior

  1. DesiredAccuracy is 10 but Accuracy getting from the plugin is 65, 1000.. or higher values.
  2. For the same location, different coordinates are coming.
  3. Getting different coordinates for the same location repeatedly.

Code snippet

Geolocator.DesiredAccuracy = 10; bool x = await Geolocator.StartListeningAsync(TimeSpan.FromSeconds(2), UnitConverters.InternationalFeetToMeters(3), false, new ListenerSettings { AllowBackgroundUpdates = true, ActivityType = ActivityType.Fitness, DeferLocationUpdates = true, DeferralDistanceMeters = UnitConverters.InternationalFeetToMeters(3), DeferralTime = TimeSpan.FromSeconds(30) });

Can you please let me know, what could be the cause of the above issues?