O'Reilly Forums: Chapter 5 Geolocation - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 5 Geolocation Geolocation not working

#1 User is offline   PraveenVKumar 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 28-December 12

Posted 28 December 2012 - 03:42 AM

Hai Friends,

Happy New Year.

Pls help I am not able to run Chapter 5 Geolocation myLoc.html

When I try in GChrome, Permission denied message comes,

When I try in IE 7, Oops, No Geolocation support alert box comes,

When I try in moziila FF, Request timeout problem occur.

friends, pls tell me what are the steps to take for the smooth running of myLoc.html file.
0

#2 User is offline   Beth Robson 

  • Advanced Member
  • PipPipPipPipPipPipPipPip
  • Group: O'Reilly Employee
  • Posts: 320
  • Joined: 17-September 08
  • Gender:Female
  • Location:Seattle, WA
  • Interests:I am interested in computer science, the Web, social media and the internet, Mac development, and adult learning.

Posted 28 December 2012 - 04:50 PM

Go to Chrome > Preferences, and type "location" into the search area at the top right. Click on "Content Settings", and scroll down to the "Location" section. Make sure that "Do not allow..." is NOT checked. Make sure that "Ask me when a site..." IS checked.

Hope that helps!

IE 7 doesn't support geolocation. If you're getting a time out with FF, then you may also get a time out with Chrome, which may mean that the browser is simply unable to get any data about your location. You can try setting the timeout to a longer time (later in the chapter, we explain how to do this). Also, on page 177, you can see how to implement an error handler which might help diagnose the problem better.

good luck!
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
0

#3 User is offline   mackerrow 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 31-December 12

Posted 31 December 2012 - 08:00 PM

View PostBeth Robson, on 28 December 2012 - 04:50 PM, said:

Go to Chrome > Preferences, and type "location" into the search area at the top right. Click on "Content Settings", and scroll down to the "Location" section. Make sure that "Do not allow..." is NOT checked. Make sure that "Ask me when a site..." IS checked.

Hope that helps!

IE 7 doesn't support geolocation. If you're getting a time out with FF, then you may also get a time out with Chrome, which may mean that the browser is simply unable to get any data about your location. You can try setting the timeout to a longer time (later in the chapter, we explain how to do this). Also, on page 177, you can see how to implement an error handler which might help diagnose the problem better.

good luck!


Happy New Year...

I am also unable to get the Chapter 5 Geolocation to work. I downloaded the code from the books website and have tried it in Chrome (with the extensions and privacy settings as you describe above), tried it in Firefox, and Safari. On Mac OS 10.7, where I have my "enable location services" set to on in my Mac system preferences. The result I get from opening all the myLoc.html files (from the code examples on the book's website) is "PERMISSION DENIED". Any help is appreciated since I was really getting into the HF HTML5 book, then sort of lost motivation once things did not work in Chapter 5. Please note that when I run the examples on the WikedlySmart server, they work and they show me my exact location... This puzzles me. What is the difference ?

Thanks
Ed
0

#4 User is offline   PraveenVKumar 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 28-December 12

Posted 01 January 2013 - 03:51 AM

View PostBeth Robson, on 28 December 2012 - 04:50 PM, said:

Go to Chrome > Preferences, and type "location" into the search area at the top right. Click on "Content Settings", and scroll down to the "Location" section. Make sure that "Do not allow..." is NOT checked. Make sure that "Ask me when a site..." IS checked.

Hope that helps!

IE 7 doesn't support geolocation. If you're getting a time out with FF, then you may also get a time out with Chrome, which may mean that the browser is simply unable to get any data about your location. You can try setting the timeout to a longer time (later in the chapter, we explain how to do this). Also, on page 177, you can see how to implement an error handler which might help diagnose the problem better.

good luck!



Thankyou sir. Thanku very much.
0

#5 User is offline   nickppbd 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 24-January 13

Posted 24 January 2013 - 10:22 PM

First of all, Sorry for my poor English.

I tried it through Chrome, Firefox on Ubuntu 12.10LTS , but It failed.

I uploaded these files on free web hosting server, and tried it again.( of course, I typed http:// servername / filename )

It worked! :)

This link will help you guys.

http://www.w3schools...geolocation.asp

This post has been edited by nickppbd: 24 January 2013 - 10:24 PM

0

#6 User is offline   Beth Robson 

  • Advanced Member
  • PipPipPipPipPipPipPipPip
  • Group: O'Reilly Employee
  • Posts: 320
  • Joined: 17-September 08
  • Gender:Female
  • Location:Seattle, WA
  • Interests:I am interested in computer science, the Web, social media and the internet, Mac development, and adult learning.

Posted 25 January 2013 - 04:18 PM

Yes, you need to run it from a web server (not file://). We do say that in the book (p179).
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users