A LatLng object has a toUrlValue method:
http://code.google.com/apis/maps/documentation/javascript/reference.html#LatLng

toUrlValue accepts an optional integer parameter to specify how many
decimal places are required, so you could update your code like this:


    google.maps.Event.addListener(gmap, "move", function() {
        var center = gmap.getCenter();
        document.getElementById("latlon").innerHTML =
center.toUrlValue(6);


    });

Martin.


On Feb 28, 5:55 am, blakilox <[email protected]> wrote:
> Hi, I am trying to work out how to reduce the amount of digits on my
> map (Where it echo's the Lat Long at the bottom) to 6 decimal places,
>
> This is the bit in the code where it echos the digits,
> At then moment, when i move my map I am getting 14 digits. Is that
> accurate to like less than 1 mm? I only want 6 digits. thanks so much,
> Gazz.
>
> My map is athttp://cairns.info
>
> <table width="640" border="0" cellpadding="4">
>   <tr>
>     <td width="448"><strong>Latitude, Longitude:&nbsp;&nbsp;</strong>
> <span id="latlon"></span></td>
>     <td width="170"><strong>Zoom level:</strong> <span id="zoom"></
> span></td>
>   </tr>
> </table>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to