Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How do I get a geolocate api jey?

  • 11 replies
  • 1 has this problem
  • Last reply by jag2jag

more options

I want to use Mozilla geolocate on a web page as the Google one requires https - how do I obtain the Mozilla api-key? Thank You

All Replies (11)

more options

See these MDN pages.

I would be surprised if the Firefox Geolocation API worked on HTTP.

more options

I need an api key to try it! How do I get one? Yjanx

more options

Oops, thanx I meant!

more options

I am using but get status 0 - invalid key?

more options

Works for me:

  • {"location": {"lat": xx.xxxx, "lng": x.xxxx}, "accuracy": 1000.0}
more options

Not for me! var url = '';'GET', url); xhr.setRequestHeader('Content-type', 'application/json'); Gives readystate:4 status:0 and "text" in text!

more options
var url = ''; 
var xhr=new XMLHttpRequest();"GET",url,true);
more options

Yes and I get - readystate:4 status:0 text when I log the 3 fields to console, which implies invalid key! Possibly it's because I'm in Thailand?

more options

Does it work at least when you visit a website that uses geolocation?

more options

Thanx. I've no sensor on the pc but, Google maps does get the approximate location though this obviously uses https!