[Bug]: Windows suddenly not giving right location
Please check the following before submitting a new issue.
- [X] I have searched the existing issues.
- [X] I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- [ ] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [X] Windows
Steps to reproduce
Build a flutter app using geolocator, dart 3.4.0, and flutter 3.22 (latest updates).
It keeps putting my lat lon over in Virginia in my app. I have not changed geoloctor code in my flutter app recently.
Expected results
Should detect correct location
Actual results
Thinks I'm in Virginia.
Code sample
Code sample
final position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.medium,
);
lat = double.parse(position.latitude.toStringAsFixed(3));
lon = double.parse(position.longitude.toStringAsFixed(3));
print('lat is: $lat');
print('lon is: $lon');```
</details>
### Screenshots or video
<details>
<summary>Screenshots or video demonstration</summary>
[Upload media here]
</details>
### Version
11.0.0, then tried 11.1.0 with same result
### Flutter Doctor output
<details><summary>Doctor output</summary>
```console
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version
10.0.22621.3447], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.89.1)
[√] Connected device (5 available)
[√] Network resources
• No issues found!```
</details>
I have confirmed that this is not a problem with my particular Windows device, as I built it and sent to a friend, and it is also showing his location as 54 miles northeast of Durham, North Carolina.
flutter: Position: Latitude: 36.6674, Longitude: -78.39
Dear @corepuncher,
Can you elaborate a bit on the subject... On what windows device are you testing this. Does it have a GPS chip? What are you expecting on both locations? and what were the actual results?
Kind regards,
It appears that the issue is resolved. I am not sure what changed, but it's working again.
- In the beginning, the gps icon would plot in correct location.
- After updating the app in May, the gps icon started plotting somewhere else, but only for windows builds. These are modern windows PCs.
- I had not checked recently, but now it appears the gps indicator is plotting in the correct location. Not sure what the deal was.