php-mapscript: abnormal death
Mark Leslie
mark at REFRACTIONS.NET
Thu Mar 3 12:33:54 PST 2005
The majority of the script is switches just turning on the requested
layers and defining postgis data lines. The
interesting (and faulty) part is the end, and is attached below. There
isn't much exciting happening there. It
was originally built for mapscript 3.6.5, I believe.
$quantiles = explode( '|', $quantiles );
foreach( $quantiles as $q ) {
$class = ms_newClassObj( $lha_layer );
$info = explode( ',', $q );
$expr = "([$column] >= " . $info[0] . " AND [$column] <= " .
$info[1] . ")";
$class->setExpression( $expr );
$color = explode( '.', $info[2] );
$style = ms_newStyleObj($class);
$style->color->setRGB($color[0], $color[1], $color[2] );
$style->outlinecolor->setRGB( 180, 180, 180 );
$class->set( 'status', MS_ON );
}
//draw and return the map
$image = $map->draw();
header( "Content-Type: image/png" );
#$image->saveImage( '', MS_PNG, 0, 0, 0 );
$image->saveImage('');
$err = ms_GetErrorObj();
while($error && $error->code != MS_NOERR) {
printf("Error in %s: %s<br />\n", $error->routine, $error->message);
$error = $error->next();
}
#echo $err[0] . "<--";
?>
>
> Mark,
>
> Can you send along a code snippet so we can see the syntax?
>
> Are you working with an application that was designed around a much
> older version of MapServer (say, 3.6.x)? If so, take a look at the
> "saveImage() and saveWebImage()" section at
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MigrationGuide
>
> You could also configure MapServer with --enable-debug to trap some more
> information.
>
> --Dylan
More information about the MapServer-users
mailing list