I am using Firefox 30.0 (latest FF), and navigator.geolocation.getCurrentPosition
is working in Chrome but not in this version of FF.
Here is my code:
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(GEOprocess, GEOdeclined);
}else{
alert('Your browser sucks. Upgrade it.');
}
function GEOdeclined(error) {
alert('Error: ' +error.message);
}
function GEOprocess(position) {
alert('it works');
}
I am getting this error:
Error: Unknown error acquiring position
Note: It stopped working after upgrading Firefox to version 30.0
Description. The getCurrentPosition method retrieves the current geographic location of the device. The location is expressed as a set of geographic coordinates together with information about heading and speed. The location information is returned in a Position object.
getCurrentPosition. Returns the device's current position as a [Position](Position/position. html) object.
maximumAge. A positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0 , it means that the device cannot use a cached position and must attempt to retrieve the real current position.
The Navigator. geolocation read-only property returns a Geolocation object that gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location.
Now I'm using 47 Mozilla. I have tried everything, but all time this problem. BUT then I open about:config in my address bar, go geo.wifi.uri and changed its value to "https://location.services.mozilla.com/v1/geolocate?key=test". works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With