[Chameleon] PrintProduction error

Ken-ichi kueda at wso.williams.edu
Thu Feb 24 17:30:45 EST 2005


Ok, now I'm consistently getting an error, though now it's a different 
one. When I click Printer Friendly Map, I still get a broken image, but 
when I directly to the image url (preview.php) I get the following error 
if I've selected GIF

Fatal error: Call to a member function on a non-object in 
/usr/local/chameleon-2.0/htdocs/widgets/PrintProduction/preview.php on 
line 267

and this if I select PNG or JPEG

The image 
“http://path/to/preview.php?sid=421e5811951d3&selImageFormat=PNG” cannot 
be displayed, because it contains errors.

This does NOT occur when I sub in the the chameleon.map mapfile from the 
samples directory. This is sort of confusing because I'm using a very 
simple and reduced mapfile, that looks like this:

MAP
NAME "VTM Data Browse"
STATUS ON
EXTENT -363827 -615083 548549 481459
SIZE 410 500
SHAPEPATH "/gisdata/vtm"
SYMBOLSET /web/ms_assets/symbols.sym
FONTSET /home/vtm/fonts/fonts.txt
WEB
IMAGEPATH "/web/tmp/"
IMAGEURL "/tmp/"
END
PROJECTION
"init=epsg:1000"
END

LAYER
NAME "Water"
GROUP "Default"
STATUS DEFAULT
DATA "/gisdata/common/albers/shapefiles/water"
TYPE POLYGON
CLASS
STYLE
COLOR 153 204 255
END
END
END
LAYER
NAME "Neighbors"
GROUP "Default"
STATUS DEFAULT
DATA "/gisdata/common/albers/shapefiles/ca_neighbors"
TYPE POLYGON
CLASS
STYLE
COLOR 255 255 204
OUTLINECOLOR 204 204 153
END
END
END
END



I'm still playing around with it, but I'm still stumped.

-Ken-ichi


Paul Spencer wrote:

> -Ken-ichi-
>
> this is very strange. You say that this happens inconsistently. Can 
> you identify any pattern that might affect this? Layer visibility, 
> scale, fonts chosen, other options? If you can figure out how to 
> reliably reproduce this then I might have a chance.
>
> Cheers
>
> Paul
>
> Ken-ichi wrote:
>
>> Hi all. I just started experimenting with the PrintProduction widget, 
>> and whenever I click the Printer Friendly Map button, I get the 
>> following error:
>>
>> Fatal error: [MapServer Error]: msPrepareImage(): Unable to 
>> initialize image. in 
>> /usr/local/chameleon-2.0/htdocs/widgets/PrintProduction/production_draw_legend.php 
>> on line 396
>>
>> This occurs in the Enhanced Sample (inconsistently) and within my own 
>> application (every time). I tried subbing in the sample's legend 
>> template for my own but that had no effect. It seems a weird place 
>> for it to get hung up, since the prepareImage() function just 
>> generates a blank image handle.
>>
>> Any ideas?
>>
>> -Ken-ichi
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>



More information about the Chameleon mailing list