In New Chrome (44.0.2403.157) Geolocations Doesnt Works
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:
I filed a bug ticket here: https://productforums.google.com/forum/?utm_medium=email&utm_source=footer#!msg/chrome/q7B6gjCr1ps/Y9DEXPZ-_HYJ
Feel free to comment there, star it, etc.
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"