Hi all,

 I am a _javascript_ for panning with images.  I type in all the code but its not panning.  Here is part of the html code. Is there something wrong with my code?  I am using a projection image with an extent of 626173.309834 5085113.091715 694065.960556 5170035.212592.  The image set in a table size of 309px by 417px. Could someone give a some suggestions.  Thanks

Albert

<script type="text/_javascript_">
  var mapheight = 417;
  var mapwidth = 309;
  var pansize = 0.75;

function pan(direction) {
  var x,y;
 
 if(direction== 'n') {
   x = (309-1)/2.0;
   y = 0 - (417 * pansize)/2.0;
 } else if(direction== 'nw') {
   x = 0 - (309 * pansize)/2.0;
   y = 0 - (309 * pansize)/2.0;
 } else if(direction== 'ne') {
   x = (309-1) + (309 * pansize)/2.0;
   y = 0 - (417 * pansize)/2.0;
 } else if(direction== 's') {
   x = (309-1)/2.0;
   y = (417-1) + (417 * pansize)/2.0;
 } else if(direction== 'sw') {
   x = 0 - (309 * pansize)/2.0;
   y = (417-1) + (417 * pansize)/2.0;
 } else if(direction== 'se') {
   x = (309-1) + (309 * pansize)/2.0;
   y = (417-1) + (417 * pansize)/2.0;
 } else if(direction== 'e') {
   x = (309-1) + (309 * pansize)/2.0;
   y = (417-1)/2.0;
 } else if(direction== 'w') {
   x = 0 - (309 * pansize)/2.0;
   y = (417-1)/2.0;
    }
 document.mapserv.imgxy.value = x + " " + y;
 document.mapserv.submit(); 
}       

</script>

<TR>
 <TD width="19" height="23" ALIGN="left" VALIGN="top" BGCOLOR="#e7a500"><a href=""><img src="" alt="pan nw" width="25" height="25" style="border-style:none"></a></TD>

 <TD ALIGN="center" BGCOLOR="#e7a500"  VALIGN="top"> <div align="center"><a href=""><img src="" alt="pan north" width="25" height="25" style="border-style:none"></a></div></TD>
                                         
<TD width="18" ALIGN="right" VALIGN="top" BGCOLOR="#e7a500"><a href=""><img src="" alt="pan ne" width="25" height="25" style="border-style:none"></a></TD>
                                        </TR>


See the all-new, redesigned Yahoo.com. Check it out.

Reply via email to