问题
I am using the following code
Geolocator myGeolocator = new Geolocator
{
DesiredAccuracy = PositionAccuracy.High
};
Geoposition myGeoposition = await myGeolocator.GetGeopositionAsync();
Geocoordinate myGeocoordinate = myGeoposition.Coordinate;
while running the simulator each time i get the location as Redmond, is this a bug, if yes then how can we get rid out of it?
回答1:
There is location sensor simulator available for Windows Phone emulator (both 7.5 and 8): How to test apps that use location data for Windows Phone.
It looks like that:
You can set current phone location to anything you want using that tool. IT also allows you to record paths and playing recorded paths.
To open it click Additional Tools button - the last one within emulator toolbar. It's hovered to yellow on photo below.
来源:https://stackoverflow.com/questions/15789766/windows-phone-8-emulator-returning-redmond-location-only