On 7/2/06, Nigel Gilbert <[EMAIL PROTECTED]> wrote:

 I'm just finishing the first iteration of a Mapserver template and have a
number of small queries that I cannot find the answers to in the
documentation:

 1. I am using [scale] to insert the current map scale (as "1:[scale]").
However, the value inserted by mapserver includes many decimal places and
would be better rounded to a reasonable number of significant figures before
it is displayed.  Is there any easier way of doing this than writing a
rounding routine in Javascript?


You can use javascript to store scale as a variable and then do the rounding:

 var scale = [scale];
 var scale_round = Math.round(scale * 1000) / 1000;
 document.write(scale);

--
Matt Perry
[EMAIL PROTECTED]
http://www.perrygeo.net

Reply via email to