[Mapserver-users] Zoom In to a defined area

Jeff L. nf10 at hotmail.com
Wed Sep 3 08:34:04 EDT 2003


Hi Palle and David,

I tried to change my code by setting mapext to the ViewArea value, but no 
success so far.
When i select an option from my combo box, the map is redrawed but with the 
old mapext value.
It's seems that i'm not setting correctly the new mapext. MapServer is using 
it's mapext value not the one i'm setting.

I'm using this code snippet. Any help how to set correctly mapext is 
appreciated.

function AreaSelected()
{
      if (document.forms[0].ViewArea.selectedIndex != 0 &&
          document.forms[0].ViewArea.selectedIndex !=1)
         {
            mapext = document.forms[0].ViewArea.value;
            document.forms[0].submit();
        }
}
...

<form method=GET action="[program]" name=myform>
...

<SELECT NAME="ViewArea"  onChange="AreaSelected()">
   <OPTION VALUE="">Go to</OPTION>
   <OPTION VALUE="">- - - - - - - - - - - - - </OPTION>
   <OPTION VALUE="-180 45 180 90">Area 1</OPTION>
   <OPTION VALUE="-180 0 180 45">Area 2</OPTION>
</SELECT >

...
<input type="hidden" name="imgxy" value="299.5 299.5">
<input  type="hidden" name="imgext" value="[mapext]"> // Is this is correct 
?
....

</form>



Jeff Lacoste

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus




More information about the mapserver-users mailing list