maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH] Limit coordinates display to 4 decimals


From: Thomas Petazzoni
Subject: Re: [Maposmatic-dev] [PATCH] Limit coordinates display to 4 decimals
Date: Wed, 9 Sep 2009 14:37:49 +0200

Pulled and pushed, thanks.

Le Wed,  9 Sep 2009 14:33:04 +0200,
Maxime Petazzoni <address@hidden> a écrit :

> ---
>  www/media/osm_map.js |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/www/media/osm_map.js b/www/media/osm_map.js
> index 3bf116c..171181a 100644
> --- a/www/media/osm_map.js
> +++ b/www/media/osm_map.js
> @@ -40,10 +40,10 @@ function updateForm()
>      var bottomright = new OpenLayers.LonLat(bounds.right,
> bounds.bottom); bottomright = bottomright.transform(epsg_projection,
> epsg_display_projection); 
> -    getUpperLeftLat().value = topleft.lat;
> -    getUpperLeftLon().value = topleft.lon;
> -    getBottomRightLat().value = bottomright.lat;
> -    getBottomRightLon().value = bottomright.lon;
> +    getUpperLeftLat().value = topleft.lat.toFixed(4);
> +    getUpperLeftLon().value = topleft.lon.toFixed(4);
> +    getBottomRightLat().value = bottomright.lat.toFixed(4);
> +    getBottomRightLon().value = bottomright.lon.toFixed(4);
>  }
>  
>  /* update map on form field modification */
> @@ -80,5 +80,6 @@ function init()
>      map.events.register('zoomend', map, updateForm);
>      map.events.register('moveend', map, updateForm);
>      updateMap();
> +    updateForm();
>  }
>  


-- 
Thomas Petazzoni                         http://thomas.enix.org
Promouvoir et défendre le Logiciel Libre http://www.april.org
Logiciels Libres à Toulouse              http://www.toulibre.org

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]