[mapserver-users] LABELITEM with TILEINDEX causes internal server error.
Ben Logan
ben at wblogan.net
Thu May 30 09:24:42 PDT 2002
Hello,
I am trying to get labels to work with tiled shapefiles, and not
having any luck. In the mapfile below, if I uncomment the LABELITEM
directive, I get an Internal Server Error and my server (Apache) error
log shows "Premature end of script headers: /var/www/cgi-bin/mapserv"
(the mapserv log doesn't generate an entry at all). If I leave
LABELITEM commented out, the counties display properly but without
labels, of course.
Also, I can use a single county tile file (instead of TILEINDEX) and
get the labels to work, so I know that "COUNTY" is a valid table
attribute.
Here's the mapfile:
#
# Start of map file
#
NAME TEST
STATUS ON
SIZE 400 400
EXTENT -81.379427 36.542485 -80.041493 37.366792
UNITS DD
#SHAPEPATH "data"
IMAGECOLOR 255 255 255
FONTSET "/var/www/html/ben/mapserv_demo/test/fonts"
#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
HEADER test_header.html
TEMPLATE test.html
FOOTER test_footer.html
LOG "test.log"
MINSCALE 1
MAXSCALE 2000000
IMAGEPATH "set in test_init.html"
IMAGEURL "set in test_init.html"
METADATA
WMS_TITLE "A test map."
WMS_ABSTRACT "This is a test."
WMS_ACCESSCONSTRAINTS none
# change this value to match your setup
WMS_ONLINERESOURCE "http://mach1.log.cabin/ben/mapserv_demo/local/test_init.html"
WMS_SRS "EPSG:26915"
END
END
#
# Start of legend
#
LEGEND
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS ON
END
#
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 255 0
SIZE tiny
END
STYLE 1
SIZE 80 2
COLOR 0 0 255
UNITS MILES
INTERVALS 1
TRANSPARENT TRUE
STATUS TRUE
END
#
# Start of symbol definitions (we're only using a few)
#
#
# Start of layer definitions
#
LAYER
NAME "County"
TYPE POLYGON
STATUS DEFAULT
#DATA "tgr51063cty00"
TILEINDEX "/var/www/html/ben/mapserv_demo/local/county.shp"
TILEITEM "location"
#LABELITEM "COUNTY"
DATA "county"
CLASS
NAME "County"
OUTLINECOLOR 0 0 0
COLOR 255 255 200
LABEL
TYPE truetype
FONT "arial"
COLOR 0 0 0
POSITION AUTO
SIZE 12
END
END
END
END # Map File
I'm using mapserver-3.5 on an Intel/Redhat 7.1 machine with Apache
1.3. Any help would be greatly appreciated.
Thanks,
Ben
--
Ben Logan: ben at wblogan dot net
OpenPGP Key KeyID: A1ADD1F0
In the Halls of Justice the only justice is in the halls.
-- Lenny Bruce
More information about the MapServer-users
mailing list