[mapserver-users] Dynamic Change

Stephen Woodbridge woodbri at swoodbridge.com
Tue May 21 11:13:50 EDT 2002


This sounds like you have a form variable that defines the center of the
map. 

For example on a 400x400 map the center is 200, 200. 

If you change the size of the map to say 600x600, the new center is 300,
300, but if you pass the center as 200, 200 from the old center, then
you it will calculate the new center as 200, 200 on the 600x600 map but
what you really want is the center to be 300, 300 on the new map which
would be the same location as 200, 200 from the old map.

So you have to change all the parameters might also be affected by the
change in map size or change you logic to know that you are changing the
mapsize and have the old size so you can adjust the parameters on the
server side if you are using mapscript.

-Steve

gabriel wrote:
> 
> Hi all.
> 
> I change de "mapsize" with this
> 
>       <SELECT SIZE="1" NAME="mapsize">
>          <OPTION VALUE="[mapsize]"> [mapsize]
>          <OPTION VALUE="800 800">800 x 800
>          <OPTION VALUE="600 600">600 x 600
>          <OPTION VALUE="500 500">500 x 500
>          <OPTION VALUE="400 400">400 x 400
>          <OPTION VALUE="300 300">300 x 300
>          <OPTION VALUE="200 200">200 x 200
>       </SELECT><br>
> 
> and this change requires the update of the value of  "X and Y" dynamically
> 
>        <input type="hidden" name="imgxy" value="X Y">  .
> 
> Without this the map loses its centralization.
> 
> Can some one help me ?
> 
> Thanks.
> 
> Gabriel
> Florianópolis - SC - Brasil



More information about the mapserver-users mailing list