The default geo.wifi.uri
https://www.googleapis.com/geolocation/ ... CE_API_KEY%
return
"Unknown error acquiring position"
no problem with mozilla location.
Do google location is not more supported?
geo.wifi.uri fault
-
- Posts: 6437
- Joined: February 3rd, 2009, 6:29 pm
Re: geo.wifi.uri fault
I got the geolocation urls working using the browser console in Firefox 95.
Google requests are sent using POST.
Mozilla requests are sent using GET.
Google requests are sent using POST.
Mozilla requests are sent using GET.
Code: Select all
(function () {
var key = AppConstants.MOZ_GOOGLE_LOCATION_SERVICE_API_KEY;
var url = "https://www.googleapis.com/geolocation/v1/geolocate?key=" + key;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function (data) {
if (xhttp.readyState == 4 && xhttp.status == 200) {
console.log(xhttp.responseText);
}
};
xhttp.open("POST", url, true);
xhttp.send(null);
})();
Code: Select all
(function () {
var key = AppConstants.MOZ_MOZILLA_API_KEY;
var url = "https://location.services.mozilla.com/v1/geolocate?key=" + key;
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function (data) {
if (xhttp.readyState == 4 && xhttp.status == 200) {
console.log(xhttp.responseText);
}
};
xhttp.open("GET", url, true);
xhttp.send(null);
})();
-
- Posts: 779
- Joined: June 12th, 2008, 9:02 am
Re: geo.wifi.uri fault
I write about Seamonkey not Firefox.
Confirmed that Google code not work and Mozilla code work in Seamonkey version 2.53.10.1.
Firefox have other Google key that Seamonkey.
Confirmed that Google code not work and Mozilla code work in Seamonkey version 2.53.10.1.
Firefox have other Google key that Seamonkey.
-
- Posts: 6437
- Joined: February 3rd, 2009, 6:29 pm
Re: geo.wifi.uri fault
The first code snippet and the other thread code snippet works for me using the browser console in SeaMonkey 2.53.10.1.
The second code snippet fails because AppConstants.MOZ_MOZILLA_API_KEY returns "no-mozilla-api-key" in SeaMonkey 2.53.10.1.
The second code snippet fails because AppConstants.MOZ_MOZILLA_API_KEY returns "no-mozilla-api-key" in SeaMonkey 2.53.10.1.