[Mapserver-users] Re: MapServer 4.0 Tutorial problems

Dave Walton mapserver at digger.net
Tue Feb 3 16:18:36 EST 2004


On Tue, 03 Feb 2004 12:00:06 -0600
mapserver-users-request at lists.gis.umn.edu wrote:

> From: "Carol L Heydon" <carol_heydon at usgs.gov>
> Subject: [Mapserver-users] MapServer Tutorial 4.0 Example 1.4 no image
> 
> I'm trying to work through Tutorial4.0 with MapServer 4.0 on Windows
> 2000. 
>  I made the needed changes to the path information in the html and map 
> files.  Everything works fine for Examples 1.1, 1.2, and 1.3, but from
> 1.4 on the image does not display.  What's different beginning with
> example 1.4?

Carol,

This sounds a lot like the problem I encountered with example 1.4.  To
check, try commenting out these three lines from the LABEL object in the
'land' CLASS of the 'states_poly' LAYER:

      TYPE TRUETYPE
      FONT arial-bold
      SIZE 12

If commenting those lines out makes it work, see below for my
solution/workaround.  Maybe it will help you, too.

> --__--__--
> 
> From: Pericles Nacionales <nacional at cbs.umn.edu>
> Subject: Re: [Mapserver-users] MapServer 4.0 Tutorial problems
> 
> Hi there!  Can you have a look at your web server's error log and see if
> there's anything pertinent to the TrueType error you're getting?  You
> might also want to check the permissions on your fonts and fonts
> directory--make sure the web server account have access to the
> directory/read access to files.

Perry,

First, thanks for the great tutorial.  It has proved very useful and
educational already, in spite of the various problems I've encountered
with it.

All I see in the access log is a status code 500, but I'm on a hosting
service, so I don't seem to have access to the error logs.  Permissions
and such are ok, as I learned when I accidentally got TrueType to work in
another map file I was working on.  Through a long process of trial and
error, I finally figured out that this is what made it work:

  OUTPUTFORMAT
    DRIVER "GDAL/GTIFF"
  END

Adding those three lines to the MAP object in example 1.4 causes TrueType
fonts to work perfectly.  I have no idea how or why, or whether this would
be called a MapServer bug or a tutorial bug.  By my understanding, those
lines shouldn't even matter, since I'm still using "IMAGETYPE PNG".  But
somehow 'DRIVER "GDAL/GTIFF"' makes it work, and using 'DRIVER "GD/PNG"'
instead doesn't work.

A minor nitpick in the text of 1.4:  At the bottom of the page, it
mentions "example1-4a.map" in reference to the ANNOTATION data type.  That
file does not exist, though example1-5.map does use ANNOTATION.

Now that I've gotten 1.4 to work, on to 1.5....

First, I find that the same OUTPUTFORMAT hack is needed for 1.5.  No
surprise there.  But that is not sufficient to get it to work for me.  I
also need to replace "IMAGETYPE PNG24" with "IMAGETYPE PNG" and disable
the "modis" layer.  Only then does it produce an image, though obviously
without the raster layer displayed.  

Any guesses why PNG24 fails (with or without the raster layer) and the
raster layer fails (with or without PNG24)?  I've tried using the idxa
version of the image, but that doesn't work, either.

Thanks again,
Dave




More information about the mapserver-users mailing list