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="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>> 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" height="23" width="29"><br>> VALIGN="top" BGCOLOR="#e7a500"><a href="javascript:pan('nw')"><img src="../images/cornerarrow5.gif" alt="pan nw" style="border-style: none;" height="25" width="25"></a></td><br>> <td align="center" bgcolor="#e7a500"><br>> VALIGN="top"> <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>> <td align="right" width="30"><br>> VALIGN="top" BGCOLOR="#e7a500"><a href="javascript:pan('ne')"><img src="../images/cornerarrow6.gif" alt="pan ne" style="border-style: none;" height="25" width="25"></a></td><br>> </tr><br>><br>> <tr><br>> <td align="left" bgcolor="#e7a500"><br>> VALIGN="MIDDLE"><a href="javascript:pan('w')"><img src="../images/cornerarrow1.gif" alt="pan west" style="border-style: none;" height="25" width="25"></a></td><br>> <td class="mapappmidaln" align="center"><br>> HEIGHT="413" VALIGN="MIDDLE" WIDTH="309"><br>><br>> <!-- calling
for map here --><br>> <input name="img" src="%5Bimg%5D" border="1" height="417" type="image" width="309"></td><br>> <td align="right" bgcolor="#e7a500"><br>> VALIGN="MIDDLE"><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>> </tr><br>> <tr><br>> <td align="left" height="21"><br>> VALIGN="bottom" BGCOLOR="#e7a500"><a href="javascript:pan('sw')"><img src="../images/cornerarrow8.gif" alt="pan sw" style="border-style: none;" height="25" width="25"></a></td><br>> <td
align="center" bgcolor="#e7a500"><br>> VALIGN="bottom"> <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>> <td align="right" bgcolor="#e7a500"><br>> VALIGN="bottom"><a href="javascript:pan('se')"><img src="../images/cornerarrow7.gif" alt="pan se" style="border-style: none;" height="25" 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 name="zoom" value="-2" type="hidden"><br>> <input name="zoomdir" value="-1" type="hidden"><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>