[Mapserver-users] More MapScript 3.7 problems

Lars V. Nielsen LVN at gispro.dk
Mon Feb 10 08:36:30 EST 2003


Hi Daniel,

No I haven't, but then I didn't think I needed to. If I've already set up a default IMAGETYPE in the MAP file, why do I need to call
a routine to do basically the same thing ?? I thought setOutputFormat was only necessary if you wanted to change from the default to
another defined format !?

And when I do insert the routine call, i.e. "$map->selectOutputFormat("xxxxx");" - found the typo :-) - I still get the previous
error from "$map->draw()", only now only for all formats with IMAGEMODE RGB (png24, jpeg etc.). I've also tried to employ DRIVER
"GDAL/..." (Frank's suggestion) but that apparently didn't change anything...

Btw:
Is there a built-in way to determine which version of MapScript is currently loaded - is there a property somewhere in the MapScript
Object Model ("MOM"?), or must I keep track of it myself ? I'm trying to stick to a single code base here :-)

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/
http://hjem.get2net.dk/lars-online/
WGS84: 10.20'40"E 55.20'20"N
----- Original Message -----
From: "Daniel Morissette" <morissette at dmsolutions.ca>
To: "Lars V. Nielsen" <LVN at gispro.dk>
Cc: "Dylan Keon" <keon at nacse.org>; "MAPSERVER-L" <mapserver-users at lists.gis.umn.edu>
Sent: Monday, February 10, 2003 1:43 AM
Subject: Re: [Mapserver-users] More MapScript 3.7 problems


>
>
> "Lars V. Nielsen" wrote:
> >
> > However, I still can't seem to get it to output anything but gif. It complains over $map->draw() (saying: Warning: MapServer
Error
> > in msDrawMap(): Unable to initialize image. in c:\...\map.php on line 308). I've copy'n'paste'd the example in the OutputFormat
> > guide, only changing the IMAGETYPE setting to e.g. "jpeg".
> >
>
> Did you change your scripts to call $map->setOutputFormat()?  In 3.6,
> you used to pass the output format to the saveImage() call, but in 3.7
> you have to call $map->selectOutputFormat("PNG") (or "GIF", "JPEG",
> etc.) *before* calling $map->draw().
>
> --
> ------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca
>  DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------
>




More information about the mapserver-users mailing list