Tech Off Post

Single Post Permalink

View Thread: Using the geolocator on Windows Phone 8
  • User profile image
    Mauricio Feijo

    I have been writing some code using the WP8 geolocator and have been finding many challenges  as I go, and as this is all somewhat new at the time this is being written, I thought I'd open a forum to share those with  others.

    Here is one that I still haven't fully resolved: Should I use the Geolocator.PositionChanged event handler to update location or should I use the Geolocator.GetGeopositionAsync async method (using await to call) and test if the location changed by a given threshold before I make updates, to a map, for example?

    I initially went for the direct call method. It worked well but seemed counter intuitive when I realized I could simply use an event handler and define the DesiredAccuracy to filter only good reads.

    I then modified my code to use the event handler. All worked well, except that the reads are sporadic. Regardless of setting Geolocator.ReportInterval or the Geolocator.MovementThreshold the event fires at will.

    I am working on this and will post developments.