<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Gracias Luis. This is very helpful.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Chip <st1:place w:st="on"><st1:City w:st="on">Taylor</st1:City></st1:place><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Prepared Response, Inc<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> UMN MapServer
Users List [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Luis Treviņo Huerta<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, January 30, 2006
8:51 AM<br>
<b><span style='font-weight:bold'>To:</span></b> MAPSERVER-USERS@LISTS.UMN.EDU<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [UMN_MAPSERVER-USERS]
scale?</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Jeremy:</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The substitution of the [scale] value is done by mapserver
CGI.</span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>this is the javascript function:</span></font><o:p></o:p></p>
</div>
<div>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>function
TomaEscala(scale){<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>var
escala, escalaStr, decimal;<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>escala =
scale; <o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>escala *=
100; <o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>escala =
Math.round(escala); <o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>escala /=
100; <o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>escalaStr
= Math.abs(escala).toString(); <o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>entero =
escalaStr.substr (0,escalaStr.length-3);<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>if
(entero.length > 3) {<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
longitud = entero.length % 3;<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
while (longitud < entero.length) {<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
if (longitud == 0) {<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
longitud = 3;<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
}<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
entero = entero.substr (0,longitud) + "," +
entero.substr(longitud,entero.length);<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
longitud += 4;<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
}<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'> }<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'> escalaStr
= entero;<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'> if
(document.createTextNode){<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'> var
mytext=document.createTextNode(escalaStr)<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'> document.getElementById("MyElementID").appendChild(mytext)<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'> }<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>}<o:p></o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>You
can call this fuction on the <body
onload="TomaEscala([scale]);"> of your template.</span></font><font
size=2><span style='font-size:10.0pt'><o:p></o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>(some
words are in spanish but I'm sure is not a problem)</span></font><font size=2><span
style='font-size:10.0pt'><o:p></o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Regards,</span></font><font
size=2><span style='font-size:10.0pt'><o:p></o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Luis</span></font><font
size=2><span style='font-size:10.0pt'><o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>