nkulkarni / geo-location-javascript

Automatically exported from code.google.com/p/geo-location-javascript
0 stars 1 forks source link

Wrong gears successCallback #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call the {obj}.coords.latitude from an android phone (HTC Magic)
2.
3.

What is the expected output? What do you see instead?
I would expect to get the latitude, but I get nothing.
If I just use {obj}.latitude it works as intended.

What version of the product are you using? On what operating system?
_0.4 (on nov 16)

Please provide any additional information below.

I fixed it by wrapping the successCallback from gears, to make it work like
the other callbacks as well.

Original issue reported on code.google.com by philipb...@gmail.com on 8 Dec 2009 at 9:05

GoogleCodeExporter commented 9 years ago
interesting. it works in the G1 I have and you are saying it doesn't work in 
your HTC
magic because the data structure is 

p.latitude
p.longitude

and not
p.coords.latitude
p.coords.longitude

If that is the case we can detect the data structure and transform it if needed.

Does this make sense to you?

Original comment by whoiss...@gmail.com on 9 Dec 2009 at 6:22

GoogleCodeExporter commented 9 years ago
please try now
http://www.merkwelt.com/people/stan/geo_js/sample.html

i have a google gears install actually that returns an object that has both 

p.latitude
p.longitude

p.coords.latitude
p.coords.longitude

now i check first which structure is available. i am not aware that there is a
scenario where it only returns p.coords, but i left it in there just in case.

please let me know if that now works. 
thank you

Original comment by whoiss...@gmail.com on 11 Dec 2009 at 2:43

GoogleCodeExporter commented 9 years ago
Yes it works perfectly now, almost identical solution to how I modified the 
geo.js :)

Original comment by philipb...@gmail.com on 11 Dec 2009 at 11:09

GoogleCodeExporter commented 9 years ago
excellent, let me check in the change. for what are you using the library?

Original comment by whoiss...@gmail.com on 11 Dec 2009 at 1:42