Hi, If you use CGI mapserver insert [SCALE] into your template. Sometimes it can be very ugly like 1499.999999. Instead you can use javascript to round the valuei to integerB. <script language="JavaScript">document.write(Math.round([SCALE]);</script>
Bye Zoltan On Mon, 30 Jan 2006, Sears, Jeremy wrote: > Hi All, > This should be an easy question, however I cant find information on it.... > > How does one display the scale of a map? Im looking to have mapserver (or > other means?) produce a scale like "1:50 000", rather than the scale bar. > > Thanks > Jeremy > > > -----Original Message----- > From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] > Behalf Of Jerl Simpson > Sent: January 30, 2006 10:27 AM > To: [email protected] > Subject: [UMN_MAPSERVER-USERS] setting variable value in mapfile > > > Hello, > > I know I can easily use variables in a mapfile, when the value comes from > cookies or a GET request. But what about setting a variable inside the > mapfile itself? > Something like: > > HIGHWAY_MAX_SCALE=2000000 > HIGHWAY_MIN_SCALE=90000 > > or > > HIGHWAY_COLOR="255 250 115" > > then be able to use something like: > > COLOR %HIGHWAY_COLOR% > > in a CLASS > > > That way if I decide I want to change a color, I can change it once, and > have it take affect for everywhere else? > > Thanks, > > > Jerl > > >
