Zoom to Extent code

Chris Helm helmster_99 at YAHOO.COM
Wed Aug 18 15:31:38 EDT 2004


I just finished digging through the archives (to no
avail) for an answer on how I can go about zooming to
a region using the standard CGI functions.

If someone could provide me some javascript code that
would make it possible to zoom to a certain extent
from a <select> drop down, I would be very thankful.

So far my code looks like:

function zoomTO(){
document.mapserv.imgext.value =
"document.mapserv.ViewRegion.options[document.mapserv.VeiwRegion.selectedIndex].value"
document.mapserv.imgbox.value = "-1 -1 -1 -1";
document.mapserv.imgxy.value = "[center]";
document.mapserv.submit();
         }
and the html:

<select name="ViewRegion" onChange="zoomTO()">
<option value="-19279421.034355 4334895.604301
-13530100.437058 9215380.487355"> </option> Alaska
and so.......

When I try and change the select menu an error says
there are not enough arguments for imgext.

Thank you
Chris

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



More information about the mapserver-users mailing list