[Mapserver-users] Using CGI to adjust REFERENCE image size

Johansen Per Henrik phj at norgit.no
Mon Jan 19 00:08:42 PST 2004


Hi,

> I have been reading the CGI reference and the docs indicate that you can 
> change most paramters of the map file from the command line. 
> My question can you change the SIZE & IMAGE of the reference map from the command line.

I tried to do the same a few weeks ago, but it did not work for me either at first, but trying to change the map_reference_image and map_reference_extent.
It seem there is a "bug" in the MS lexer, so I had to change a few line in the maplexer.l file, and then recompile MS. This is the diff I used: 

diff mapserver-4.0.1/maplexer.l mapserver-4.0.1-perhenrik/maplexer.l
121c121
< <INITIAL>extent                                      { return(EXTENT); }
---
> <INITIAL,OBJECT_STRING>extent                        { return(EXTENT); }
138c138
< <INITIAL>image                                       { return(IMAGE); }
---
> <INITIAL,OBJECT_STRING>image                         { return(IMAGE); }

After applying this, I was able to chang the variables using map_reference_image and map_reference_extent from cgi. In your case the variables would be map_reference_image and map_reference_size.

Per Henrik

-- 
Interconsult NORGIT AS 
Per Henrik Johansen 
Systemutvikler/Systems developer 
Tel: + 47 69 394805   Mob: + 47 950 71822 
icq: 4975767 
Web: http://www.norgit.no 




More information about the MapServer-users mailing list