zoom to fixed scale

Stender, Amy ERDC-CRREL-NH Amy.Stender at erdc.usace.army.mil
Thu Nov 29 13:35:14 EST 2001


i'm trying to have a "Zoom to Fixed Scale" on my webpage, but am unsure
about my javascript. the pulldown in my html looks like:

<tr><td><font>Zoom to Fixed Scale:</font>
<select name="fixscale" onchange="fixedScale()">
<option value="[scale]" selected>Current - 1:[scale]</script>
<option value="24000">1:24,000
<option value="1000000">1:1,000,000
<option value="2000000">1:2,000,000
</select></td></tr>

and my javascript is:

function fixedScale() {
document.mapserv.imgbox.value = 0 + " " + 0 + " " + [mapwidth] + " " +
[mapheight];
document.mapserv.imgxy.value = ([mapwidth]-1)/2.0 + " " +
([mapheight]-1)/2.0;
document.mapserv.scale =
document.mapserv.fixscale.options[document.mapserv.fixscale.selectedIndex].v
alue;  
document.mapserv.submit();  
}

looks okay to me, i can't figure out what the problem is.
any help?

thanks.

Amy L. Stender
Remote Sensing/GIS Center
Cold Regions Research and Engineering Laboratory
United States Army Corps of Engineers
72 Lyme Road, Hanover, NH 03755-1290
Tel: (603) 646-4733
Fax: (603) 646-4730
astender at crrel.usace.army.mil





More information about the mapserver-users mailing list