Hi all, I wondered if anybody could help me.
We are building a UWP app (using runtime 100.12) and experimenting with the Device location functionality to plot the user's position on a map.
This is on Windows, so using the Windows Location Service to provide the data. If there is no GPS device available, Windows will revert to WiFi to provide the approximate location.
However we've noticed that in this case the Esri device location reports a position of 0,0 most of the time, occasionally showing the approximate location, and the AdditionalSourceProperties says the source is "GNSS".
However if we use the native Windows Geolocation API, we get a correct position and a source of "Wifi".
Subscribing to the LocationChanged event, we can see the repeated 0,0 with the odd correct position thrown in:
30/11/2021 11:05:15:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:16:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:16:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:17:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:18:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:18:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:18:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:19:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:20:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:20:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:21:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:21:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:22:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:22:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:23:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:23:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:24:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:24:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:25:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:25:MapPoint[X=0.51206589, Y=51.273515, Z=0, Wkid=4326]
30/11/2021 11:05:26:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:27:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:27:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
30/11/2021 11:05:28:MapPoint[X=0, Y=0, Z=0, Wkid=4326]
I just wondered if this was deliberate or if there is something we can do to get the Esri device location to consistently use the Wifi position if that is all that is available.
The other thing I wondered was how come the locationChanged event is firing twice a second when the position remains at 0,0.
Hope this makes sense and somebody can point me in the right direction.
Regards,
John