<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>It should be substituted. Try with some other
simple values like [extent] or [mapx]   [mapy] on your template and
their values should be displayed. You can also try using mode=browse into your
url that calls mapserv. <A
href="http://www.host.com/cgi-bin/mapserv?mode=browse&map=yourmapfile.map">www.host.com/cgi-bin/mapserv?mode=browse&map=yourmapfile.map</A>.......</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>saludos</FONT></DIV>
<DIV><FONT face=Arial size=2>Luis</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Jeremy.Sears@CCRS.NRCAN.GC.CA
href="mailto:Jeremy.Sears@CCRS.NRCAN.GC.CA">Sears, Jeremy</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=MAPSERVER-USERS@LISTS.UMN.EDU
href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 30, 2006 11:03
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [UMN_MAPSERVER-USERS]
scale?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=054465516-30012006>Muy
Bien!</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=054465516-30012006>Thanks for that Luis.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=054465516-30012006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=054465516-30012006>You
say that the subsitution is done by mapserver CGI? I've insterted the
following code into my html template as per a previous
suggestion:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=054465516-30012006></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff><SPAN class=054465516-30012006>
<P class=MsoNormal><FONT color=navy><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><td></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Map Scale:  
    1:[scale]</SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></td></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006>However the output of this code doesnt is as
follows:</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006>Map Scale:
1:[scale]</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006></SPAN></SPAN></FONT> </P>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006>It would seem that the scale value isnt being
subsituted. Can you suggest what might (or might not) be causing
this?</SPAN></SPAN></FONT></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006>Gracias</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006>Jeremy</SPAN></SPAN></FONT></P></BLOCKQUOTE>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006></SPAN></SPAN></FONT> </P>
<P class=MsoNormal><FONT size=+0><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN
class=054465516-30012006></SPAN></SPAN></FONT> </P></SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Luis Treviņo Huerta
[mailto:ltrevino@gpobsi.com.mx]<BR><B>Sent:</B> January 30, 2006 11:51
AM<BR><B>To:</B> Sears, Jeremy;
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re: [UMN_MAPSERVER-USERS]
scale?<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Jeremy:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The substitution of the [scale] value is done
by mapserver CGI.</FONT></DIV>
<DIV><FONT face=Arial size=2>this is the javascript function:</FONT></DIV>
<DIV><FONT size=2>
<P>function TomaEscala(scale){</P>
<P>var escala, escalaStr, decimal;</P>
<P></P>
<P>escala = scale; </P>
<P>escala *= 100; </P>
<P>escala = Math.round(escala); </P>
<P>escala /= 100; </P>
<P>escalaStr = Math.abs(escala).toString(); </P>
<P></P>
<P>entero = escalaStr.substr (0,escalaStr.length-3);</P>
<P>if (entero.length > 3) {</P>
<P> longitud = entero.length % 3;</P>
<P> while (longitud < entero.length) {</P>
<P> if (longitud == 0) {</P>
<P> longitud = 3;</P>
<P> }</P>
<P> entero = entero.substr (0,longitud) + "," +
entero.substr(longitud,entero.length);</P>
<P> longitud += 4;</P>
<P> }</P>
<P> }</P>
<P> escalaStr = entero;</P>
<P> if (document.createTextNode){</P>
<P> var mytext=document.createTextNode(escalaStr)</P>
<P> document.getElementById("MyElementID").appendChild(mytext)</P>
<P> }</P>
<P>}</P>
<P><FONT face=Arial>You can call this fuction on the <body
onload="TomaEscala([scale]);"> of your template.</FONT></P>
<P><FONT face=Arial>(some words are in spanish but I'm sure is not a
problem)</FONT></P>
<P><FONT face=Arial>Regards,</FONT></P>
<P><FONT face=Arial>Luis</FONT></P></FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Jeremy.Sears@CCRS.NRCan.gc.ca
href="mailto:Jeremy.Sears@CCRS.NRCan.gc.ca">Sears, Jeremy</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=ltrevino@gpobsi.com.mx
href="mailto:ltrevino@gpobsi.com.mx">'Luis Treviņo Huerta'</A> ; <A
title=MAPSERVER-USERS@LISTS.UMN.EDU
href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 30, 2006 10:38
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [UMN_MAPSERVER-USERS]
scale?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006>Thanks for the reply Luis,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006>I would indeed like to see your code.
</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=035503216-30012006>>>you
can use [scale] in your template file.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=035503216-30012006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006>Formating aside, Im assuming that the template
file need to have some extra code inorder to subsitute [scale] with the
value of the scale. Is this assumption correct? If so, where can I find
that code?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=035503216-30012006>Jeremy</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=035503216-30012006></SPAN></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Luis Treviņo Huerta
[mailto:ltrevino@gpobsi.com.mx]<BR><B>Sent:</B> January 30, 2006 11:21
AM<BR><B>To:</B> Sears, Jeremy;
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re:
[UMN_MAPSERVER-USERS] scale?<BR><BR></FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2>Jeremy:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>you can use [scale] in your template
file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Use some javascript to format the value of
scale (like: 1:50,000 or 1:50.000). I have a small code that does this
formating using a getElementById. if you want it I can mail it to
you.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Luis</FONT></DIV></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Jeremy.Sears@CCRS.NRCAN.GC.CA
href="mailto:Jeremy.Sears@CCRS.NRCAN.GC.CA">Sears, Jeremy</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=MAPSERVER-USERS@LISTS.UMN.EDU
href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 30, 2006
9:45 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [UMN_MAPSERVER-USERS]
scale?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006>Hi All,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006>This should be an easy question, however I
cant find information on it....</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006>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. </SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006>Jeremy</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=945583515-30012006></SPAN></FONT> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> UMN MapServer
Users List [mailto:MAPSERVER-USERS@LISTS.UMN.EDU]<B>On Behalf Of
</B>Jerl Simpson<BR><B>Sent:</B> January 30, 2006 10:27
AM<BR><B>To:</B> MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B>
[UMN_MAPSERVER-USERS] setting variable value in
mapfile<BR><BR></FONT></DIV>Hello,<BR><BR>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?<BR>Something like:<BR><BR>HIGHWAY_MAX_SCALE=2000000
<BR>HIGHWAY_MIN_SCALE=90000<BR><BR>or<BR><BR>HIGHWAY_COLOR="255 250
115"<BR><BR>then be able to use something like:<BR><BR>COLOR
%HIGHWAY_COLOR% <BR><BR>in a CLASS<BR><BR><BR>That way if I decide I
want to change a color, I can change it once, and have it take
affect for everywhere else?
<BR><BR>Thanks,<BR><BR><BR>Jerl<BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>