Skip to content Skip to sidebar Skip to footer

In New Chrome (44.0.2403.157) Geolocations Doesnt Works

Its seems like in new chrome version on MacOs on Linux Mint and on Windows geolocations doesnt works! Its returns error: 'ERROR(2): Network location provider at 'https://www.googl

Solution 1:

Must be a bug in the latest version of Chrome, also happens in the page of Google Maps API: https://developers.google.com/maps/documentation/javascript/examples/map-geolocation

Hopefully it will be fixed fast.

Edited: Try now, it works :)

Solution 2:

Apparently this API has been forbidden access from insecure locations see here

Solution 3:

Solution 4:

For future queries:

Starting with Chrome 50, Chrome no longer supports obtaining the user’s location using the HTML5 Geolocation API from pages delivered by non-secure connections. This means that the page that’s making the Geolocation API call must be served from a secure context such as HTTPS.

https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only?hl=en

This will break your web apps on chrome if you're not using HTTPS.

Solution 5:

i didn't get any solution for "Returned error code 403" but i found one solution to get current location if google api fails

if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function (position) {
            current_location_lat = position.coords.latitude;
            current_location_lon = position.coords.longitude;
           }, function (error) {
//if error occurred by google api
              $.getJSON("http://ipinfo.io", function (ipinfo) {
                var latLong = ipinfo.loc.split(",");
                current_location_lat = latLong[0];
                current_location_lon = latLong[1];
                 });
            });

    } else {
        // Browser doesn't support Geolocationalert("Error: Your browser doesn\'t support geolocation");
    }

Post a Comment for "In New Chrome (44.0.2403.157) Geolocations Doesnt Works"