R: [Mapserver-users] scale
Daniele Margotti
margottid at comune.lugo.ra.it
Sat May 8 03:41:14 PDT 2004
I used:
<script>
document.write(Math.round([scale]));
</script>
In this case, if I have (for example) scale=9999.9998, I get "10000"
(and not 9999, as with parseInt).
Daniele
-----Messaggio originale-----
Da: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu] Per conto di Martin
Weinelt
Inviato: giovedì 6 maggio 2004 9.21
A: mapserver-users at lists.gis.umn.edu
Cc: Stephen Woodbridge; Kaps Stefan
Oggetto: Re: [Mapserver-users] scale
On Thursday 06 May 2004 04:04, Stephen Woodbridge wrote:
> You can write a small javascript to reformat it. I think this has been
> discussed in the past and is probably in the archives.
>
> <script>
> scale = int([scale]);
> document.write scale
> </script>
>
> or something like that.
>
> -Steve W.
[...]
scale = parseInt([scale]);
[...]
It's called 'parseInt' in JS ..., another obstacle to correctly shoot
yourself
in the foot ...
Martin
> Kaps Stefan wrote:
> > Dear MapServer colleagues!
> > Just a short question: how can I change the format of my scale? now
> > the format is 1:ssssss.ssss but I don't want the decimal number...
> > (just
> > 1:ssssss)
> >
> > cheers,
> > Stefan
> >
> > _______________________________________________
> > Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> _______________________________________________
> Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--
--- Martin Weinelt
--- kk+w - digital cartography
--- Kiel, Germany
--- Tel: +49.431.5791165
--- http://www.planiglobe.com
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list