[mapserver-users] zoom to fixed scale (fwd)

Kralidis, Tom Tom.Kralidis at ccrs.nrcan.gc.ca
Sun Dec 2 13:02:13 EST 2001


Hi,

What sort of problems are you running into?  A couple of potential problems
I see:

- one of your scale option tags is closed by a script tag
- document.mapserv.scale should be document.mapserv.scale.value

Note that the scale variable should be used with the mapxy variable.

..Tom

=================================
Tom Kralidis
Systems Scientist
Canada Centre for Remote Sensing
Tel: (613) 947-1828
http://www.ccrs.nrcan.gc.ca/
=================================


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