[Mapserver-users] mapsize change

Yewondwossen Assefa assefa at dmsolutions.ca
Mon Feb 10 11:57:26 EST 2003


Hi There,

 Can you keep this values in a hidden form variables so when the page is
submitted, you will always get the lates map width/heigh values.

 Note also that in GMap (although it was done through php), this same logic was
used to kee-p track on the map width/height.


Later,

Steve McCrone wrote:

> 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>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------






More information about the mapserver-users mailing list