Closed gauravchauhan closed 12 years ago
Not working on Firefox 9.0.1 on windows 7 machine as well. Looks like the issue is common with firefox. It always return 0 for both long and lat.
Further debugging this issue i found out the following :
I added few debug statements inside foundLocation method :
console.debug("position : "+position.coords.longitude); var jsonPos = JSON.stringify(position); console.debug(" jsonPos : "+jsonPos);
Here is the output : position : 77.33 jsonPos : {}
Looks like it encountered error while parsing the json on firefox. It can fetch position easily but it can't parse it.
Still looking for a fix.
Any thoughts on this ?
IMPORTANT: I think this issue is solved with the proposed correction in issue # 8.
@jcolombo1 : Did you submit a pull request ? I would like to test the new code on my system.
Hi. Sébastien Blanc (author) told me that will upgrade it tonight.
Anyway, I attach file with correction made for transient test.
You must replace it in:
I hope that works for you too! Jorge Colombo Argentina
-----Mensaje original----- De: Gaurav Chauhan [mailto:reply@reply.github.com] Enviado el: viernes, 02 de marzo de 2012 14:02 Para: jcolombo1 Asunto: Re: [geolocation] Not working on Ubuntu 11.10, Firefox 9.0.1 (#6)
@jcolombo1 : Did you submit a pull request ? I would like to test the new code on my system.
Reply to this email directly or view it on GitHub: https://github.com/sebastienblanc/geolocation/issues/6#issuecomment-4289582
@jcolombo1 : Where did you attach the file ?
You're probably seeing this behaviour from Firefox. The Firefox implementation of JSON.stringify, which returns an empty string, is correct here as per spec. See that link for details.
Thanks for clarification
I am trying to print the long, lat inside my action and here is the output :
latitude : 0.0 longitude : 0.0
If i load the showMap action ( http://localhost:8080/testGeoLocOnGrails2/geolocation/showMap ) it takes me to somewhere below Nigeria.
Works on Chrome on same machine.