[Mapserver-users] mapsize change

Steve McCrone mccrone at pc.jaring.my
Sun Feb 9 22:33:29 PST 2003


What I thought would be easy is causing me trouble. I am using mapserver cgi
with the rosa applet.
I simply want a combo box where the user can select a mapsize and then the
size of the map would change. My code does change the size of the map, and
the variables [mapwidth] and [mapheight] to change accordingly. My problems
are -

 Once I perform any other subsequent actions, like pan/zoom the map size
reverts back to that established in the map file.
Some how I have to "SET" the mapsize value permanently until the user
selects the combo box again.


I got the idea from the GMap example -

<SCRIPT LANGUAGE="JavaScript">
function MapSizeSelected()
{
    if (document.forms[0].MapSize.selectedIndex != 0 &&
document.forms[0].MapSize.selectedIndex !=1){
    document.forms[0].submit();
    document.forms[0].zoomdir.value = "0";}
}
</SCRIPT>

- - -
<SELECT NAME="MapSize" onChange="MapSizeSelected()">
<OPTION>Map Size</OPTION>
<OPTION>---------------</OPTION>
<OPTION VALUE="400 300" SELECTED> 400 x 300</OPTION>
<OPTION VALUE="600 450"> 600 x 450</OPTION>
<OPTION VALUE="800 600"> 800 x 600</OPTION>
</SELECT>







More information about the MapServer-users mailing list