Function Geolocation.getCurrentPosition does not work on Chrome 50.0

1

I have a system in JSF that asks the user for permission to read their coordinates, this system always worked, but after the last update of Chrome, it stopped working. Someone is going through this with this new version (50.0.2661.75):

<script type="text/javascript">
function getGeo(){
    navigator.geolocation.getCurrentPosition(function(position){
        sendGeo(position.coords);
    },showError);
}
function showError(error) {
    var msgError = "";
    switch(error.code) {
        case error.PERMISSION_DENIED:
            msgError = "Usuário negou o pedido de Geolocalização."
            break;
        case error.POSITION_UNAVAILABLE:
            msgError = "As informações de localização não está disponível."
            break;
        case error.TIMEOUT:
            msgError = "O pedido para obter a localização do usuário expirou."
            break;
        case error.UNKNOWN_ERROR:
            msgError = "Ocorreu um erro desconhecido."
            break;
        default:
            msgError = "-";
            break;
    }
    sendGeo({msgerror:msgError});
}
jQuery( document ).ready(function(){
     if (navigator.geolocation) {
        getGeo();
    } 
});
</script>

I noticed that the browser does not even acknowledge that this site is requesting the location.

    
asked by anonymous 18.04.2016 / 22:30

0 answers