php-mapscript: abnormal death

Dylan Keon keon at NACSE.ORG
Thu Mar 3 13:20:29 PST 2005


Mark,

IIRC, even though the png outputformat is implicitly defined, you still
need to declare 'IMAGETYPE png' in your mapfile.  Or you can do
selectOutputformat() as Bart suggested.  Although I'm not sure whether
selectOutputformat() works with the implicitly defined formats, or only
OUTPUTFORMAT declarations in your mapfile.

--Dylan


On 03/03/2005 01:04 PM, Mark Leslie wrote:
> My understanding was the OUTPUTFORMAT was implicitly defined, and the
> mapfile output format would
> be used by default.  Of course my understanding is limited, so I tried
> it to no avail.
>
> I've found a work around however.  It seems that writing to a file works
> fine, just not to standard out.  I've done
> the workaround that I write to a temp file, then read the file directly
> to stdout.  So far, it's fixed the app, but it's still not
> an ideal solution.  I've also filed a bug (1269).
>
> Mark
>
>
> Bart van den Eijnden wrote:
>
>> Hi Mark,
>>
>> Have you defined an outputformat in your MAP file (or dynamically in
>> php)?
>>
>> http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#outputformat
>>
>> eg for png 8 bits:
>>
>> OUTPUTFORMAT
>>   NAME png
>>   DRIVER "GD/PNG"
>>   MIMETYPE "image/png"
>>   IMAGEMODE PC256
>>   EXTENSION "png"
>> END
>>
>> Maybe you even need to set it (I don't know if this is necessary if there
>> is only 1 output format though ...):
>>
>> $map->selectOutputFormat('png');
>>
>> Hope this helps.
>>
>> Best regards,
>> Bart
>>



More information about the MapServer-users mailing list