Conditional IMAGETYPE possible w/ CGI?
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Tue Oct 2 22:01:21 PDT 2007
Dave: I handle this on the client-side by changing the imagetype (in 5.0 this
would be done using &map.imagetype=JPEG or map.imagetype=PNG) as
necessary just before submitting the request. Here's a site that does just
that:
http://www.dnr.state.mn.us/maps/fom/mapper.html
Only when the orthophotos are on do I request jpegs. Otherwise it's a gif.
Steve
>>> Dave Fuhry <dfuhry at GMAIL.COM> 09/17/07 1:11 PM >>>
I'm using CGI mapserver, and would like it to return JPEGs when an
ortho layer is active, and 8-bit PNGs otherwise.
The CGI reference makes no reference of an exposed IMAGETYPE or
equivalent parameter. Variable substitution in the mapfile (IMAGETYPE
"%param%") doesn't seem to work.
Are there any easy ways to conditionally specify the IMAGETYPE using
CGI mapserver, or will I have to preprocess the mapfile?
Thanks,
Dave Fuhry
More information about the MapServer-users
mailing list