sebastienblanc / geolocation

Geolocation grails plugin
http://www.grails.org/plugin/geolocation
Other
13 stars 8 forks source link

Not working on Ubuntu 11.10, Firefox 9.0.1 #6

Closed gauravchauhan closed 12 years ago

gauravchauhan commented 12 years ago

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.

gauravchauhan commented 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.

gauravchauhan commented 12 years ago

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.

gauravchauhan commented 12 years ago

Any thoughts on this ?

gcsis commented 12 years ago

IMPORTANT: I think this issue is solved with the proposed correction in issue # 8.

gauravchauhan commented 12 years ago

@jcolombo1 : Did you submit a pull request ? I would like to test the new code on my system.

gcsis commented 12 years ago

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: -> plugins-> geolocation 0.4 -> views-> templates (in STS Eclipse IDE).

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

gauravchauhan commented 12 years ago

@jcolombo1 : Where did you attach the file ?

daanvanesch commented 12 years ago

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.

gauravchauhan commented 12 years ago

Thanks for clarification