Geolocation - returning zero to server only

Asked

Viewed 22 times

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 in an archive in my AWS cloud or using this fiddle within the corporate network of the company, it returns me the zero mark of geolocation (Praça da Sé - SP), either by computer or by mobile accessing the company’s internet.

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

Has anyone experienced anything like this? Do I need any release within the company’s firewall? Release anything within AWS? Something that might defile my Cloud with Codepen servers.

  • I went through something similar at the company and in our case was the firewall; try to see if it’s not the same with you, since using the 4G it shows the point correctly

  • @If this is really the issue of the firewall, I don’t have what to do, it’s leave so for security reasons, but in the case of AWS what can be?

  • The issue of firewall It would be nice if you could test without it, to make sure that’s the point. How much AWS I don’t believe you need any extra configuration.

  • @rLinhares is that the only other environment I can test is in AWS, but there something is barring

  • 1

    Got it.. Let’s hope someone tries to help then :P

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.