I am trying to get the user current geolocation using "navigator.geolocation.getCurrentPosition" on Android 4.4 device. Its working fine when i'm passing this option
var gpsOptions = { timeout: 30000, }; ONLY.
Problem is that when i'm trying to increase the accuracy by passing some extra options. Its stop detecting user geolocation.
var gpsOptions = {
enableHighAccuracy: true,
timeout: 20000,
maximumAge: 100
};
I searched ,somebody says,enableHighAccuracy: true, does not work on Android. Is that true?. If yes, how can i increase the accuracy for geolocation on Android devices.Please help. Below is my code for getting geolocation.
watchID = navigator.geolocation.getCurrentPosition(this.onNavigatorSuccess, this.onNavigatorFailure, gpsOptions);
 
0 comments:
Post a Comment