i have a question about this topic. navigator.geolocation.getCurrentPosition does not seems to work for me on Android 4.2.2 on many browsers and 4 devices. It ask about my location, I can accept or decline but whatever I pick it does not fire success or errorr function.
My sample code:
function GoogleMap(){
this.initialize = function(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(geolocationSuccess,geolocationError);
} else {
geolocationError();
}
}
}
function geolocationSuccess(position){
alert(position);
}
function geolocationError(){
alert('Geolocation disabled');
}
Can You help me with that?