开发者

Getting Coarse GPS Location on Windows Phone 7 (rather than precise location)

I have seen various articles on how to get location information on WP7, such as Getting GPS coordinates on Windows phone 7.

On Android, there is an option to ask for Coarse location instead of Fine location. This is very useful for leaderboards etc as you only really care about the city that the user is in and not there exact whereabouts. And of course helps with provacy concer开发者_StackOverflow社区ns. It basically gives you the location of the cell phone network.

Is there any such feature in WP7, to get Coarse location not fine? If not, is there any way to translate a fine location to a coarse one? I mean I can add 500m to the gps coordinate, but this may provide bad info if on a boundary, but this may be the way to go, not sure...

Any insight would be much appreciated!

Thanks


You can alter the accuracy of the GeoCoordinateWatcher by changing its DesiredAccuracy property. You'd want to set it to Default instead of High (although, if you haven't changed it, it should be set to Default anyway).


If you use the GeoCoordinateWatcher with Default accuracy the rest may be based solely on cell tower location. depending on where you are the cell tower may cover an area up to several km.

Regardless of the accuracy of the lat/long returned by the GCW you can convert this to an address (using the Bing Location API) and then use a part of the returned address (such as locality or Area District) as a coarse or approximate location.

Note that not every location maps to an address though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜