exside / geo-location-javascript

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

Need more decimal numbers for longitude latitude #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
Need more decimal numbers for longitude latitude

What version of the product are you using? On what operating system?
0.4.7

Please provide any additional information below.
I want to use lat and lon that geo-location-javascript returns to another "map 
showing place"  in my web site. 
The problem is that the returned lat and lon returns only 2 decimal numbers 
(like 23.XX) so the accurancy is not so great. geo-location-javascript though 
found my exact place in the first place.

Is there any way to get more than 2?

Original issue reported on code.google.com by Kamui...@gmail.com on 17 Dec 2011 at 7:52

GoogleCodeExporter commented 9 years ago
lat and lon are actually floats, i only cut them in the example for display 
purposes. 

Original comment by whoiss...@gmail.com on 19 Dec 2011 at 3:19

GoogleCodeExporter commented 9 years ago
I guess the location is good but the text is cut down to 2 decimal places is 
that correct? how do I disable this?

Thanks

Regards

Mark

Original comment by mlewis%n...@gtempaccount.com on 5 Jan 2012 at 1:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If you use the code from sample.html search for the 

function success_callback(p)
        {
            alert('lat='+p.coords.latitude.toFixed(2)+'; lon='+p.coords.longitude.toFixed(2));
        }

Make those "toFixed(2)" above 4 or 6,according to your decimal needs

In sample_with_map.html

function show_position(p)
{
    document.getElementById('current').innerHTML="latitude="+p.coords.latitude.toFixed(2)+" longitude="+p.coords.longitude.toFixed(2);

Original comment by Kamui...@gmail.com on 5 Jan 2012 at 8:02

GoogleCodeExporter commented 9 years ago

Original comment by whoiss...@gmail.com on 17 Apr 2012 at 9:13