[mapserver-users] Mapscript newby ..
Lowell Filak
lfilak at medinaco.org
Wed Mar 13 07:27:26 PST 2002
For debuggung purposes:
change $map->{interlace} to 0 .
change $map->{transparent} to 0 .
put a few lines in between the "print header;" & "print end_html;" lines:
$num_layers = $map->{numlayers};
$minx = $map->{extent}->{minx};
$maxx = $map->{extent}->{maxx};
print "<br>$num_layers<br>$minx<br>$maxx<br>\n";
If you already have "use CGI qw(:standard *table);" in your script then you should see some output for the number of layers, minx, & maxx in the browser otherwise do a 'View -> Page Source' in the browser. Does the output look correct?
Does "tail /var/log/httpd/error_log" show anything relating to "your_cgi_name.cgi"?
Is your script/cgi executing with the -w option set?
Lowell F.
The following message was sent by Giorgio Volpe <giorgio at nauta.it> on Wed, 13 Mar 2002 14:01:56 +0100.
> I'm tring to use mapscript but i stop at the first step!
>
> draw() saves an empty file using:
>
> #!/usr/bin/perl
> use mapscript;
> $map = new mapObj('demo.map') or die('Unable to open mapfile.');
> $img = $map->draw() or die('Unable to draw map');
> mapscript::msSaveImage($img, "ex.jpg", 3 , $map->{interlace},
> $map->{transparent}, 95);
>
> where demo.map is itasca example map.
> Where is the problem? How can i debug this?
>
> My mapserv -v returns:
> MapServer version 3.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=TTF
> INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE
>
>
> Thanks in advance
>
> --
>
> Giorgio
>
> -----------------------------------------
More information about the MapServer-users
mailing list