W3C Geolocation API not working in Chrome

Works perfectly for me - with both Chrome 11 and Firefox 4.0.1 on Win 7

  • Make sure you've not disabled location tracking in Chrome: Options > Under the Hood > Content Settings > Location
  • Because of security restrictions, resources loaded with the file:/// scheme are not allowed access to location. See HTML 5 Geo Location Prompt in Chrome.

If your domain is insecure (e.g. HTTP rather than HTTPS) then you are not allowed access to location in Chrome. This is since Chrome version 50 (12PM PST April 20 2016).

See https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only for details.