0

I have an HTML5 page loaded on server along with a geolocation script. The code is working and has no errors. It shows the position and map the user. Right now, it's working well for everyone else and i also tried the same on other PC and it works. But, when i visit the page on my Chrome browser, nothing shows up. Why is that happening? Why can't it locate me and map me? I have Windows 7 OS running the latest Chrome and using data-card for internet.

This is the LINK

On the other hand, the Google page accurately shows my location on the left bar side

michaelmichael
  • 13,755
  • 7
  • 54
  • 60
Pankaj Upadhyay
  • 12,966
  • 24
  • 73
  • 104

3 Answers3

1

That page detects my location correctly in Chrome 17 (dev channel). I do see a JavaScript error, however: "Uncaught ReferenceError: geocoder is not defined" on line 81 of myLoc.js. Taking a quick look at the code, it doesn't appear to be defined anywhere. Have you perhaps forgotten to include a file?

Mike West
  • 5,097
  • 25
  • 26
1

I experienced the same issue with geolocation script. It seems to be an issue with Chrome specifically blocking the uri starting with "file:///" for security reasons.

See related articles:

http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/chrome/give-feature-feedback-and-suggestions/E0yx7wne-RI

http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/chrome/report-a-problem-and-get-troubleshooting-help/pNcftbZTN1E

HTML 5 Geo Location Prompt in Chrome

Community
  • 1
  • 1
0

Check in your chrome, in settings -> advanced -> privacy (content) -> localization if you allow web pages to check your location (this menus can be named a bit different, I'm checking on Polish Chrome).

You say nothing shows up and the question to allow web page to check location should show up (this happens by me).

Another thing, geolocation is checked by Wi-Fi if available, determine it by your IP may be quite inaccurate.

Danubian Sailor
  • 1
  • 38
  • 145
  • 223
  • Can it have something about me using a data-card for interned purposes. Because when i connect my laptop to a broadband, it works – Pankaj Upadhyay Nov 23 '11 at 08:08