<!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 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>&nbsp;</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>&nbsp;</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">&lt;td&gt;</SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Map Scale: &amp;nbsp 
&amp;nbsp &amp;nbsp 1:[scale]</SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&lt;/td&gt;</SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT><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><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
class=054465516-30012006>Map Scale:&nbsp;&nbsp;&nbsp; 
1:[scale]</SPAN></SPAN></FONT></P>
<P class=MsoNormal><FONT><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
class=054465516-30012006></SPAN></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT><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><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=054465516-30012006>Gracias</SPAN></SPAN></FONT></P>
  <P class=MsoNormal><FONT><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
  class=054465516-30012006>Jeremy</SPAN></SPAN></FONT></P></BLOCKQUOTE>
<P class=MsoNormal><FONT><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
class=054465516-30012006></SPAN></SPAN></FONT>&nbsp;</P>
<P class=MsoNormal><FONT><SPAN 
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><SPAN 
class=054465516-30012006></SPAN></SPAN></FONT>&nbsp;</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>&nbsp;</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 &gt; 3) {</P>
  <P>&nbsp;&nbsp;&nbsp; longitud = entero.length % 3;</P>
  <P>&nbsp;&nbsp;&nbsp; while (longitud &lt; entero.length) {</P>
  <P>&nbsp;&nbsp;&nbsp; if (longitud == 0) {</P>
  <P>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; longitud = 3;</P>
  <P>&nbsp;&nbsp;&nbsp; }</P>
  <P>&nbsp;&nbsp;&nbsp; entero = entero.substr (0,longitud) + "," + 
  entero.substr(longitud,entero.length);</P>
  <P>&nbsp;&nbsp;&nbsp; longitud += 4;</P>
  <P>&nbsp;&nbsp;&nbsp; }</P>
  <P>&nbsp;}</P>
  <P>&nbsp;&nbsp;escalaStr = entero;</P>
  <P>&nbsp;&nbsp;&nbsp;if (document.createTextNode){</P>
  <P>&nbsp;&nbsp;&nbsp;var mytext=document.createTextNode(escalaStr)</P>
  <P>&nbsp;&nbsp;&nbsp;document.getElementById("MyElementID").appendChild(mytext)</P>
  <P>&nbsp;&nbsp;&nbsp;}</P>
  <P>}</P>
  <P><FONT face=Arial>You can call this fuction on the &lt;body 
  onload="TomaEscala([scale]);"&gt; 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>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=035503216-30012006>&gt;&gt;you can 
    use [scale] in your template file.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=035503216-30012006></SPAN></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>you can use [scale] in your template 
      file.</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
        <DIV><FONT face=Arial color=#0000ff size=2><SPAN 
        class=945583515-30012006>How does one display the scale&nbsp;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>&nbsp;</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>&nbsp;</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.&nbsp; 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&nbsp; 
          %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></BODY></HTML>