Windows Phone 8 Geolocator returns fake emulator location

I tried to show my location in the xaml windows phone 8. application. But always, when I try to find my current location, I get a fake microsoft location, even using the default maps application. For example, this code above always returns the same latitude and longitude:

Geolocator locator = new Geolocator(); locator.DesiredAccuracy = PositionAccuracy.High; Geoposition position = await locator.GetGeopositionAsync(); LatitudeValue.Text = position.Coordinate.Latitude.ToString("0.00"); LongitudeValue.Text = position.Coordinate.Longitude.ToString("0.00"); 
+4
source share
4 answers

The Windows Phone 8 emulator has a small toolbar in the upper right corner. The bottom button is a double chevron (for example, "→") - if you click on it, "Advanced Tools" will appear, and on one of the tabs "Location". You can double-click on the map to indicate your location in the emulator, and you can also record and play back the route you traveled.

+9
source

If I add a button to the map, then call

 await locator.GetGeopositionAsync(); 

It always returns Microsoft coordinates (47.643318, -122.141937), no matter what current location I choose.

Sounds like a mistake or am I missing something? Does anyone else experience this?

+4
source

Regarding the Microsoft HQ location error, there is work.

If you installed:

 geoLocator = new Geolocator { DesiredAccuracy = PositionAccuracy.High }; 

It will show the location that you set in the additional emulator tools.

+3
source

The emulator always returns a fake location. As gregstoll mentioned, you can control which "fake" location should report. There is no way to get the true location using the built-in APIs.

0
source

All Articles