<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff 
size=2>Albert, </FONT></SPAN></DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff size=2>You 
may want to look at how it is done in the dBox interface.</FONT></SPAN></DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff size=2><A 
href="http://maps.dnr.state.mn.us/tools/dbox/">http://maps.dnr.state.mn.us/tools/dbox/</A></FONT></SPAN></DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff size=2>In 
fact, you may just want to use dBox or modify it.  </FONT></SPAN></DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=718215615-02082006><FONT face=Arial color=#0000ff 
size=2>David.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us 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>Albert 
  Anderson<BR><B>Sent:</B> Wednesday, August 02, 2006 10:50 AM<BR><B>To:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re: [UMN_MAPSERVER-USERS] 
  panning and zoomin and out, and ect<BR><BR></FONT></DIV>Hi,<BR><BR>Its not 
  working cause It doesnt do anything when I click the button.  I got know 
  if I want my number to go negative. I am new to this.  You told me to try 
  this i would try<BR>if(direction=='nw'){<BR>x = 1;<BR>y = 1;<BR>}<BR><BR>so do 
  I change my code that I have?  else if(direction== 'nw') 
  {<BR>   x = 0 + (309 * pansize)/2.0;<BR>   y = 0 + (309 * 
  pansize)/2.0;<BR><BR>I dont know what I am doing?Could you help 
  me?<BR><BR>Thanks,<BR>Albert<BR><B><I>Brent Pedersen 
  <bpederse@nature.Berkeley.EDU></I></B> wrote:
  <BLOCKQUOTE class=replbq 
  style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">hi, 
    can you give more info on how it is not working?<BR>what happens?<BR>you may 
    want to check what x and y are coming out as.<BR>often + will concatenate 
    numbers instaed of adding.<BR><BR>also, are you sure you want x and y to go 
    negative as you<BR>have made them in 'nw' for example?<BR><BR>i would 
    try<BR>if(direction=='nw'){<BR>x = 1;<BR>y = 1;<BR>}<BR>which i think should 
    recenter you on the upper left corner of the map.<BR><BR><BR>On Wed, 2 Aug 
    2006, Albert Anderson wrote:<BR><BR>> Hi,<BR>> I put my code with this 
    email "hoping" for more than just it maybe in your map file or hidden 
    variables thats all.<BR>><BR>> Thanks,<BR>> Albert<BR>><BR>> 
    Luis Treviño <LTREVINOH @gmail.com="">wrote: Albert:<BR>> Maybe the 
    problem is in your map file or in the hidden variables of your 
    template.<BR>><BR>><BR>><BR>> 2006/8/1, Albert Anderson 
    <BART_DOGGERS @yahoo.com="">: Hi,<BR>><BR>> I tried that code. I didnt 
    get it to work. Here is my code. Can you see if I need to do something else? 
    What else do I need?<BR>> <BR>><BR>> <!-- Panning Javascript here --><BR>>
    <SCRIPT language=javascript type=text/javascript><br>>  var mapheight = 417;<br>>  var mapwidth = 309;<br>> 
 var pansize = 0.75;<br>><br>> function pan(direction) {<br>>  var x,y;<br>><br>> if(direction== 'n') {<br>>   x = (309-1)/2.0;<br>>   y = 0 - (417 * pansize)/2.0;<br>> } else if(direction== 'nw') {<br>>   x = 0 - (309 * pansize)/2.0;<br>>   y = 0 - (309 * pansize)/2.0;<br>> } else if(direction== 'ne') {<br>>   x = (309-1) + (309 * pansize)/2.0;<br>>   y = 0 - (417 * pansize)/2.0;<br>> } else if(direction== 's') {<br>>   x = (309-1)/2.0;<br>>   y = (417-1) + (417 * pansize)/2.0;<br>> } else if(direction== 'sw') {<br>>   x = 0 - (309 * pansize)/2.0;<br>>   y = (417-1) + (417 * pansize)/2.0;<br>> } else if(direction== 'se') {<br>>   x = (309-1) + (309 * pansize)/2.0;<br>>   y = (417-1) + (417 * pansize)/2.0;<br>> } else if(direction== 'e') {<br>>   x = (309-1) + (309 * pansize)/2.0;<br>>   y = (417-1)/2.0;<br>> } else if(direction== 'w') {<br>>   x = 0 - (309 * pansize)/2.0;<br>>   y = (417-1)/2.0;<br>>    }<br>><br>> document.mapserv.imgxy.value = x + " " + y;<br>>
 document.mapserv.submit();<br>>  }<br>><br>> </SCRIPT>
     <BR>><BR>> </BART_DOGGERS></LTREVINOH>
    <TABLE width=368><BR>> HEIGHT="460" BORDER="0" align="left" 
      CELLPADDING="0" CELLSPACING="0"><BR>><BR>> 
      <TBODY><BR>> 
      <TR><BR>> 
        <TD align=left width=29 height=23><BR>> VALIGN="top" 
          BGCOLOR="#e7a500"><A href="javascript:pan('nw')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan nw" src="../images/cornerarrow5.gif" 
        width=25></A></TD><BR>> 
        <TD align=middle bgColor=#e7a500><BR>> VALIGN="top"> 
          <DIV align=center><A href="javascript:pan('n')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan north" src="../images/cornerarrow2.gif" 
          width=25></A></DIV></TD><BR>> 
        <TD align=right width=30><BR>> VALIGN="top" BGCOLOR="#e7a500"><A 
          href="javascript:pan('ne')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan ne" src="../images/cornerarrow6.gif" 
        width=25></A></TD><BR>> </TR><BR>><BR>> 
      <TR><BR>> 
        <TD align=left bgColor=#e7a500><BR>> VALIGN="MIDDLE"><A 
          href="javascript:pan('w')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan west" src="../images/cornerarrow1.gif" 
        width=25></A></TD><BR>> 
        <TD class=mapappmidaln align=middle><BR>> HEIGHT="413" 
          VALIGN="MIDDLE" WIDTH="309"><BR>><BR>> <!-- calling
 for map here --><BR>> <INPUT type=image height=417 width=309 
          src="%5Bimg%5D" border=1 name=img></TD><BR>> 
        <TD align=right bgColor=#e7a500><BR>> VALIGN="MIDDLE">
          <DIV align=left><A href="javascript:pan('e')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan east" src="../images/cornerarrow3.gif" 
          width=25></A></DIV></TD><BR>> </TR><BR>> 
      <TR><BR>> 
        <TD align=left height=21><BR>> VALIGN="bottom" 
          BGCOLOR="#e7a500"><A href="javascript:pan('sw')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan sw" src="../images/cornerarrow8.gif" 
        width=25></A></TD><BR>> 
        <TD align=middle bgColor=#e7a500><BR>> VALIGN="bottom"> 
          <DIV align=center><A href="javascript:pan('s')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan south" src="../images/cornerarrow3gif.gif" 
          width=25></A></DIV></TD><BR>> 
        <TD align=right bgColor=#e7a500><BR>> VALIGN="bottom"><A 
          href="javascript:pan('se')"><IMG 
          style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" 
          height=25 alt="pan se" src="../images/cornerarrow7.gif" 
        width=25></A></TD><BR>> 
    </TR></TBODY></TABLE><BR>><BR>><BR>><BR>> Luis Treviño 
    <LTREVINOH @gmail.com="">wrote:<BR>><BR>> 2006/7/21, Albert Anderson 
    <BART_DOGGERS @yahoo.com="">: Hi,<BR>><BR>> I figure out my images. 
    Does anyone have a _java script for using a image for panning. I have images 
    set for the corners of my map. I want to use them to pan.<BR>><BR>> 
    You can use something like this, you have to handle your width and height of 
    your image:<BR>> alto = height, ancho = width.<BR>> function 
    paneo(direccion,alto,ancho) {<BR>> var x,y;<BR>> var pansize = 
    0.75;<BR>> if(direccion == 'n') {<BR>> x = (ancho-1)/2.0;<BR>> y = 
    0 - (alto * pansize)/2.0;<BR>> } else if(direccion == 'nw') {<BR>> x = 
    0 - (ancho * pansize)/2.0;<BR>> y = 0 - (ancho * pansize)/2.0;<BR>> } 
    else if(direccion == 'ne') {<BR>> x = (ancho-1) + (ancho * 
    pansize)/2.0;<BR>> y = 0 - (alto * pansize)/2.0;<BR>> } else 
    if(direccion == 's') {<BR>> x = (ancho-1)/2.0;<BR>> y = (alto-1) + 
    (alto * pansize)/2.0;<BR>> } else if(direccion == 'sw') {<BR>> x = 0 - 
    (ancho * pansize)/2.0;<BR>> y = (alto-1) + (alto * pansize)/2.0;<BR>> 
    } else if(direccion == 'se') {<BR>> x = (ancho-1) + (ancho * 
    pansize)/2.0;<BR>> y = (alto-1) + (alto * pansize)/2.0;<BR>> } else 
    if(direccion == 'e') {<BR>> x = (ancho-1) + (ancho * 
    pansize)/2.0;<BR>> y = (alto-1)/2.0;<BR>> } else if(direccion == 'w') 
    {<BR>> x = 0 - (ancho * pansize)/2.0;<BR>> y = (alto-1)/2.0;<BR>> 
    }<BR>> document.mapserv.imgxy.value = x + " " + y;<BR>> 
    document.mapserv.submit();<BR>> }<BR>><BR>><BR>> Anyother 
    question, is there a _java script for images to zoom-in and out?<BR>> you 
    can use the zoomdir and the zoom values within your template, like:<BR>> 
    <INPUT type=hidden value=-2 name=zoom><BR>> <INPUT type=hidden value=-1 
    name=zoomdir><BR>> for a zoom out., so you can use radio buttons to 
    manage this values<BR>><BR>><BR>><BR>> One more question, I have 
    a refresh button and pan radio button, then we I click refresh to take a 
    layer off it moves the projective image. Why? But when I am on zoomin radio 
    button and click refresh it acts like its panning? Why?<BR>><BR>> 
    Thanks,<BR>><BR>> Albert<BR>><BR>> 
    __________________________________________________<BR>> Do You 
    Yahoo!?<BR>> Tired of spam? Yahoo! Mail has the best spam protection 
    around<BR>> http://mail.yahoo.com<BR>><BR>><BR>><BR>> Hope 
    this helps.<BR>><BR>> Regards,<BR>> 
    Luis<BR>><BR>><BR>><BR>><BR>><BR>><BR>> 
    ---------------------------------<BR>> Yahoo! Messenger with Voice. Make 
    PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or 
    less.<BR>><BR>><BR>><BR>><BR>><BR>><BR>><BR>> 
    ---------------------------------<BR>> Talk is cheap. Use Yahoo! 
    Messenger to make PC-to-Phone calls. Great rates starting at 
    1¢/min.</BART_DOGGERS></LTREVINOH></BLOCKQUOTE><BR>
  <P>
  <HR SIZE=1>
  Groups are talking. We´re listening. Check out the <A 
  href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=41144/*http://groups.yahoo.com/local/newemail.html">handy 
  changes to Yahoo! Groups.</A> </BLOCKQUOTE></BODY></HTML>