<br><br>
<div><span class="gmail_quote">2006/7/21, Albert Anderson <<a href="mailto:bart_doggers@yahoo.com">bart_doggers@yahoo.com</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>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.</div></blockquote>
<div> </div>
<div>You can use something like this, you have to handle your width and height of your image:</div>
<div>alto = height, ancho = width.</div>
<div>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> </div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Anyother question, is there a _java script for images to zoom-in and out?</div></blockquote>
<div>you can use the zoomdir and the zoom values within your template, like:</div>
<div><input type="hidden" name="zoom" value="-2"></div>
<div>
<div><input type="hidden" name="zoomdir" value="-1"></div>
<div>for a zoom out., so you can use radio buttons to manage this values</div>
<div> </div>
<div> </div></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>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> </div>
<div><span class="sg">Albert <br></span></div>
<div><span class="ad">
<p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.yahoo.com/" target="_blank">
http://mail.yahoo.com</a> </p></span></div></blockquote></div><br>
<div>Hope this helps.</div>
<div><br>Regards,</div>
<div>Luis</div>