Geolocation - returning zero-point only on the server

1

I have the following code that returns my latitude and longitude.

Fiddle

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Geolocalização</title>
</head>
<body>
    <h1>Geolocalização</h1>
</body>
<script src="j/jquery.js"></script>
<script src="j/gears_init.js"></script>
<script src="j/geo.js"></script>
<script>
    $(function(){
        if(geo_position_js.init()){
            geo_position_js.getCurrentPosition(geo_success, geo_error);
        }
    });

    function geo_success(p){
        alert("Encontrado na latitude "+p.coords.latitude+", longitude "+p.coords.longitude);
    }

    function geo_error(){
        alert("Não conseguimos encontrar você!");
    }
</script>
</html>

By uploading this code to a file on my AWS cloud or using this fiddle within the company's corporate network, it returns me the zero mark of the geolocation (Praça da Sé - SP), either by the computer or the mobile phone accessing the company internet.

Running the same test on my mobile phone on a 4G network (location attached), accessing the code in AWS, it also returns me the zero mark, but if I access the fiddle codepen by the cell phone in 4G, it returns me to my location current perfectly!

Has anyone ever experienced something similar? Do I need some release inside the company firewall? Unlock something inside the AWS? Something that might set my Cloud up with the CodePen servers.

    
asked by anonymous 11.08.2017 / 15:35

0 answers