Hi,<br>  <br>  Its not working cause It doesnt do anything when I click the  button.&nbsp; I got know if I want my number to go negative. I am new  to this.&nbsp; 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?&nbsp; else if(direction== 'nw') {<br>  &nbsp;&nbsp; x = 0 + (309 * pansize)/2.0;<br>  &nbsp;&nbsp; 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 &lt;bpederse@nature.Berkeley.EDU&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">  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>&gt; Hi,<br>&gt;   I put my code with this email "hoping" for more than just it maybe in your map file or hidden variables thats all.<br>&gt;<br>&gt;  Thanks,<br>&gt;  Albert<br>&gt;<br>&gt; Luis Treviño <ltrevinoh @gmail.com=""> wrote:  Albert:<br>&gt;  Maybe the problem is in your map file or in the hidden variables of your template.<br>&gt;<br>&gt;<br>&gt;<br>&gt;  2006/8/1, Albert Anderson <bart_doggers @yahoo.com="">:    Hi,<br>&gt;<br>&gt;  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>&gt; <br>&gt;<br>&gt;  <!-- Panning Javascript here --><br>&gt; <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>&gt;<br>&gt; </bart_doggers></ltrevinoh><table width="368"><br>&gt;                                       HEIGHT="460" BORDER="0"  align="left" CELLPADDING="0" CELLSPACING="0"&gt;<br>&gt;<br>&gt;                                        <tbody><br>&gt;                                           <tr><br>&gt;                                             <td align="left" height="23" width="29"><br>&gt;                                               VALIGN="top"  BGCOLOR="#e7a500"&gt;<a href="javascript:pan('nw')"><img src="../images/cornerarrow5.gif" alt="pan nw" style="border-style: none;" height="25" width="25"></a></td><br>&gt;                                             <td align="center" bgcolor="#e7a500"><br>&gt;                                                VALIGN="top"&gt; <div align="center"><a href="javascript:pan('n')"><img src="../images/cornerarrow2.gif" alt="pan north" style="border-style: none;" height="25"
 width="25"></a></div></td><br>&gt;                                             <td align="right" width="30"><br>&gt;                                                VALIGN="top" BGCOLOR="#e7a500"&gt;<a href="javascript:pan('ne')"><img src="../images/cornerarrow6.gif" alt="pan ne" style="border-style: none;" height="25" width="25"></a></td><br>&gt;                                           </tr><br>&gt;<br>&gt;                                           <tr><br>&gt;                                             <td align="left" bgcolor="#e7a500"><br>&gt;                                                VALIGN="MIDDLE"&gt;<a href="javascript:pan('w')"><img src="../images/cornerarrow1.gif" alt="pan west" style="border-style: none;" height="25" width="25"></a></td><br>&gt;                                             <td class="mapappmidaln" align="center"><br>&gt;                                                HEIGHT="413" VALIGN="MIDDLE" WIDTH="309"&gt;<br>&gt;<br>&gt; <!-- calling
 for map here --><br>&gt;                                               <input name="img" src="%5Bimg%5D" border="1" height="417" type="image" width="309"></td><br>&gt;                                             <td align="right" bgcolor="#e7a500"><br>&gt;                                                VALIGN="MIDDLE"&gt;<div align="left"><a href="javascript:pan('e')"><img src="../images/cornerarrow3.gif" alt="pan east" style="border-style: none;" height="25" width="25"></a></div></td><br>&gt;                                           </tr><br>&gt;                                           <tr><br>&gt;                                             <td align="left" height="21"><br>&gt;                                                VALIGN="bottom" BGCOLOR="#e7a500"&gt;<a href="javascript:pan('sw')"><img src="../images/cornerarrow8.gif" alt="pan sw" style="border-style: none;" height="25" width="25"></a></td><br>&gt;                                             <td
 align="center" bgcolor="#e7a500"><br>&gt;                                                VALIGN="bottom"&gt; <div align="center"><a href="javascript:pan('s')"><img src="../images/cornerarrow3gif.gif" alt="pan south" style="border-style: none;" height="25" width="25"></a></div></td><br>&gt;                                             <td align="right" bgcolor="#e7a500"><br>&gt;                                                VALIGN="bottom"&gt;<a href="javascript:pan('se')"><img src="../images/cornerarrow7.gif" alt="pan se" style="border-style: none;" height="25" width="25"></a></td><br>&gt; </tr></tbody></table><br>&gt;<br>&gt;<br>&gt;<br>&gt; Luis Treviño <ltrevinoh @gmail.com=""> wrote:<br>&gt;<br>&gt;  2006/7/21, Albert Anderson <bart_doggers @yahoo.com="">:     Hi,<br>&gt;<br>&gt;  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>&gt;<br>&gt;  You can use
 something like this, you have to handle your width and height of your image:<br>&gt;  alto = height, ancho = width.<br>&gt;  function paneo(direccion,alto,ancho) {<br>&gt;  var x,y;<br>&gt;  var pansize = 0.75;<br>&gt; if(direccion == 'n') {<br>&gt;   x = (ancho-1)/2.0;<br>&gt;   y = 0 - (alto * pansize)/2.0;<br>&gt; } else if(direccion == 'nw') {<br>&gt;   x = 0 - (ancho * pansize)/2.0;<br>&gt;   y = 0 - (ancho * pansize)/2.0;<br>&gt; } else if(direccion == 'ne') {<br>&gt;   x = (ancho-1) + (ancho * pansize)/2.0;<br>&gt;   y = 0 - (alto * pansize)/2.0;<br>&gt; } else if(direccion == 's') {<br>&gt;   x = (ancho-1)/2.0;<br>&gt;   y = (alto-1) + (alto * pansize)/2.0;<br>&gt; } else if(direccion == 'sw') {<br>&gt;   x = 0 - (ancho * pansize)/2.0;<br>&gt;   y = (alto-1) + (alto * pansize)/2.0;<br>&gt; } else if(direccion == 'se') {<br>&gt;   x = (ancho-1) + (ancho * pansize)/2.0;<br>&gt;   y = (alto-1) + (alto * pansize)/2.0;<br>&gt; } else if(direccion == 'e') {<br>&gt;   x =
 (ancho-1) + (ancho * pansize)/2.0;<br>&gt;   y = (alto-1)/2.0;<br>&gt; } else if(direccion == 'w') {<br>&gt;   x = 0 - (ancho * pansize)/2.0;<br>&gt;   y = (alto-1)/2.0;<br>&gt;    }<br>&gt; document.mapserv.imgxy.value   = x + " " + y;<br>&gt; document.mapserv.submit();<br>&gt; }<br>&gt;<br>&gt;<br>&gt;    Anyother question, is there a _java script for images to  zoom-in and out?<br>&gt;  you can use the zoomdir and the zoom values within your template, like:<br>&gt;  <input name="zoom" value="-2" type="hidden"><br>&gt;    <input name="zoomdir" value="-1" type="hidden"><br>&gt;  for a zoom out., so you can use radio buttons to manage this values<br>&gt;<br>&gt;<br>&gt;<br>&gt;  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>&gt;<br>&gt; Thanks,<br>&gt;<br>&gt;  Albert<br>&gt;<br>&gt;  
  __________________________________________________<br>&gt; Do You Yahoo!?<br>&gt; Tired of spam? Yahoo! Mail has the best spam protection around<br>&gt;  http://mail.yahoo.com<br>&gt;<br>&gt;<br>&gt;<br>&gt;  Hope this helps.<br>&gt;<br>&gt; Regards,<br>&gt;  Luis<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; ---------------------------------<br>&gt;  Yahoo! Messenger with Voice. Make PC-to-Phone Calls   to the US (and 30+ countries) for 2¢/min or less.<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; ---------------------------------<br>&gt; Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.</bart_doggers></ltrevinoh></blockquote><br><p>&#32;
                <hr size=1>Groups are talking. We&acute;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>