c# - Geolocator.GetGeopositionAsync() return rounded values if regional setting isn't set on "English (United-States)" -


i try use geolocation function windows phone 8.1, , works when emulated windows phone has regional setting on "english (united state)", application targetting french people, , when try regional setting (by default on computer) "french (france)" longitude , lattitude values irrelevant, because rounded.

my code:

geolocator watcher = new geolocator(); watcher.desiredaccuracy = positionaccuracy.high; geoposition position = await watcher.getgeopositionasync(); double lat = position.coordinate.point.position.latitude; double lon = position.coordinate.point.position.longitude; 

with regional setting on "english (united state)", lat , lon values "48.12345", when keep default / "french (france)" regional setting, "48.0" (and values incorrects watcher object).

i tried many thing (i suspect decimal separator guilty maybe geolocation simulator sent value "48,12345", parsing of these value out of scope, sealed functions). tried change regional format in apps many ways, nothing works now.

someone know workaround this? (i found similar case on internet german developers, don't find solution...)

since pointed out problem happens emulator , not on actual phone should check system settings.

i used have numerous issues wp geolocation feature on dev machines , using "english" standardization of decimal grouping prevent these problems.

there article explains how setup (which easy downside affects display of numbers on system such in office..):

http://dotnetbyexample.blogspot.de/2014/05/windows-phone-emulatorunable-to-create.html


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -