I am fetching location using navigator.geolocation.getCurrentPosition. I am thinking about ignore this location output into account if location is fetched using other ways than GPS (Like wifi, mobile tower etc). Is there a way to figure out how the browser fetched location? My code is given bellow.
var locate = function() {
showMessage('fetching_location')
navigator.geolocation.getCurrentPosition(function(location) {
send({
latitude: location.coords.latitude,
longitude: location.coords.longitude,
accuracy: location.coords.accuracy,
status: "geolocated"
}, 'location_reported')
},
function(error) {
if(error.code == 1)
send({
status: "permission_denied"
}, 'permission_denied')
else
send({
status: 'geolocation_error'
}, 'not_geolocated')
},
{
maximumAge:10000, timeout: 20000, enableHighAccuracy: true
}
);
}