<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Paul,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>You are right, if I hardcode the szImgType
variable, it changes the imagetype. But it doesn't seem to want to change any
other way. There is this piece of code in there which doesn't seem to have any
effect:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>if (isset($http_form_vars["gszImgType"]) &&
$http_form_vars["gszImgType"] != "")<BR> $szImgType =
$http_form_vars["gszImgType"];</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The way I see this, it should allow a parameter in
the form called gszImgType to override the imagetype. Why doesn't it work? Even
if I just try</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>isset($http_form_vars["gszImgType"]) </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and place the gszImgType in the url as a parameter,
or in the form as an input type, it acts as if this variable isn't set. I'm not
much of a php expert, but I thought the isset function checks whether a
parameter has a value.....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is it because I use a mapfile?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jacob</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: Paul Spencer
[mailto:pagameba@magma.ca] <BR>Sent: 19 August 2004 10:09<BR>To: Jacob Delfos;
<A
href="mailto:chameleon@lists.maptools.org">chameleon@lists.maptools.org</A><BR>Subject:
Re: [Chameleon] change imagetype on the fly</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>Jacob, you should be able to modify the image type in drawmap.php since
this is the only<BR>place that it actually draws the map. Note that
drawmap does not save the map state, so<BR>you would have to change it on every
map draw. The code would look something like:</DIV>
<DIV> </DIV>
<DIV>$oMap->selectOutputFormat( 'GIF' );</DIV>
<DIV> </DIV>
<DIV>I think. And you could insert this just before the $oMap->draw();
call. You could also<BR>(at the risk of adding a little overhead) loop
through all the layers in the map and test<BR>for the layer types and only
switch to jpeg when a raster layer is visible ...</DIV>
<DIV> </DIV>
<DIV>Cheers,</DIV>
<DIV> </DIV>
<DIV>Paul</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>On Aug 18, "Jacob Delfos" <<A
href="mailto:jacob.delfos@maunsell.com">jacob.delfos@maunsell.com</A>>
wrote:<BR>> Hi List,<BR>> <BR>> <BR>> <BR>> I am attempting to
modify chameleon to allow the imagetype to change on the fly.<BR>Ideally, I want
to reach a situation where chameleon is smart enough to know it should
use<BR>gif, except when an aerial photograph is in the background. This will
greatly increase the<BR>speed of the page, because my jpeg maps are typically
around 88kb, whereas a gif would be<BR>ten times smaller for linework and
areas.<BR>> <BR>> <BR>> <BR>> I tried to override the nImageType in
drawmap.php by making it pick it up from the http<BR>parameters. But even if I
hardcode the nImageType variable, I keep getting a jpeg. Also<BR>(which may be
the cause), the temporary map files that are created specify jpeg as
imagetype.<BR>> <BR>> <BR>> <BR>> If I want to override the
imagetype, where do I change that?<BR>> <BR>> <BR>> <BR>>
regards,<BR>> <BR>> <BR>> <BR>> Jacob<BR>> <BR>> <BR>>
<BR>> <BR>> <BR>> <BR>> <BR>> JACOB DELFOS<BR>> <BR>>
SPATIAL INFORMATION ANALYST<BR>> <BR>> Maunsell Australia Pty Ltd<BR>>
<BR>> 629 Newcastle Street<BR>> <BR>> PO Box 81<BR>> <BR>>
Leederville 6902<BR>> <BR>> Western Australia<BR>> <BR>> ABN 20 093
846 925<BR>> <BR>> <BR>> <BR>> Tel + 61 8
9281 6185<BR>> <BR>> Fax + 61 8 9281 6297<BR>>
<BR>> <A
href="mailto:jacob.delfos@maunsell.com">jacob.delfos@maunsell.com</A><BR>>
<BR>> _______________________________________________<BR>> Chameleon
mailing list<BR>> <A
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR>>
<a<BR>href='http://lists.maptools.org/mailman/listinfo/chameleon'>http://lists.maptools.org/mailman/listinfo/chameleon</a><BR>>
<BR>> <BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>if (isset($http_form_vars["gszImgType"]) &&
$http_form_vars["gszImgType"] != "")<BR> $szImgType =
$http_form_vars["gszImgType"];</FONT></DIV></BODY></HTML>