I'm using Navigator geolocation property to detect User's device location. In the return object I'm receiving a parameter 'coords', according to which I'm identifying what is the sensor used to determine user's location. GPS, Wifi, or IP, (n/w triangulation).
This wasn't an issue before and it was working fine but now altitude and altitudeAccuracy is null
Any suggestions that could help me determine what is to be done to determine how the location was captured would help.
input: navigator.geolocation.getCurrentPosition(function(response){console.log(response);})
Output: {
Object {
coords: Object {
accuracy: 30
altitude: null
altitudeAccuracy: null
heading: null
latitude: 28.492950699999998
longitude: 77.081955
speed: null
}
timestamp: 1579076825120
}
Now the issue is with other devices than iPhones. I'm receiving the altitude and altitudeAccuracy parameters in Apple Devices.
Output in iPhone:
Object {
coords: Object {
accuracy: 65
altitude: 227.05543518066406
altitudeAccuracy: 10
floorLevel: null
heading: null
latitude: 28.492904178327134
longitude: 77.08190460816849
speed: null
}
timestamp: 1579074376596
}
So if there is any other way I can detect whether GPS is used to capture device location or it was captured using wifi/IP that would serve my use-case.