Zoom to Extent code

Ryan, Adam ARyan at CO.LINN.OR.US
Wed Aug 18 13:08:07 PDT 2004


Chris,

The parameters [imgbox] and [imgext] are used for navigating with an
existing image.  [imgxy] is usually used with [scale].  If you know the
extent you want, just use the [mapext] parameter and leave the rest out.

Read through the CGI help page to see the rest.

http://mapserver.gis.umn.edu/doc42/cgi-reference.html

Hope it helps,

Adam

-----Original Message-----
From: Chris Helm [mailto:helmster_99 at YAHOO.COM]
Sent: Wednesday, August 18, 2004 12:32 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Zoom to Extent code


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.selectedInd
ex].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