Tech Off Post

Single Post Permalink

View Thread: Using the geolocator on Windows Phone 8
  • User profile image
    Dr Herbie

    @Mauricio Feijo: Note that I haven't used the new WP8 GPS library, but I have used the older WP7 libraries.

    I would go with the PositionChanged event as it will give you a more optimised use of the GPS data.  Use the MovementThreshold property to set the desired accuracy for the position changed (e.g. 'Give me a position every time it passes 100m from the last position').  This will let the library take care of the details and makes your own code simpler.

    The problem is that GPS readings are not always as accurate as you might expect and you can get large 'spikes' that will suddenly give you coordinate in the middle of a field half a mile away;  I ended up using the position changed with a threshold plus some code in the handler to filter out these odd large movements (by calculating the distance between the new coordinate and the last coordinate and filtering out anything over 150 meters away (appropriate for a walking app).