Hi,
I'm currently going through the 5th chapter of Beginning Mapserver, by
Kropla, and I'm trying to get the demo fourth.html working on my
installation.
The page comes up fine, but without a map image, or reference image, and if
I click on the map (to force an error message) I get the following:
getDouble(): Symbol definition error. Parsing error near ([):(line 194)
I'm pretty sure it's referring to my mapfile, but for one thing, that's the
very end - ie: END # end of map file
The previous line is another END statement for the layer.
I can't see any obvious error, and the "[" character doesn't even occur in
the map file, so how the parsing error can be near one mystifies me a bit.
It could be a mapserver (Linux) environment problem, as I've found I can't
invoke shpinfo, gdalinfo and the like from command line.
Can anyone give me any pointers on how I can narrow it down a little?
(Mapfile below - mostly unmodified, only paths changed, and one font.)
Finally, does anyone have any pointers for any good discussion forums for
mapserver - I find mailing lists a bit clunky :/
Marwood
#####################################
#
# MapServer Fourth application
#
#####################################
# Map object
#
NAME "Fourth" # used as base image name
UNITS dd # units are decimal degrees
EXTENT -180.0 -85.0 180.0 85.0 # map extent
SIZE 640 320 # map image size in pixels
IMAGECOLOR 200 225 255 # background color
IMAGETYPE gif # image type jpeg/gif/png
SHAPEPATH "/home/g/i/gisel/public_html/files/maps/data/" # path to
data directory
#FONTSET "/var/www/htdocs/fontset.txt" # pointers to fonts
FONTSET "/home/g/i/gisel/public_html/files/maps/fonts/fonts.list"
#####################################
# Web object
#
WEB
# A header/footer defined in a web object is displayed
# before/after any individual query response is made.
# It is displayed only once.
#
HEADER
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_web_header.html"
FOOTER
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_web_footer.html"
EMPTY "/files/maps/htdocs/fourth_empty.html" # URL
TEMPLATE "/home/g/i/gisel/public_html/files/maps/htdocs/fourth.html"
IMAGEPATH "/home/g/i/gisel/public_html/files/maps/htdocs/"
IMAGEURL "/files/maps/htdocs/tmp/" # URL
# HEADER "/files/maps/htdocs/fourth_web_header.html"
# FOOTER "/files/maps/htdocs/fourth_web_footer.html"
# EMPTY "/files/maps/htdocs/fourth_empty.html" # URL
# TEMPLATE "/files/maps/htdocs/fourth.html"
# IMAGEPATH "/files/maps/htdocs/"
# IMAGEURL "/files/maps/htdocs/tmp/" # URL
END
#####################################
# Reference map
#
REFERENCE
IMAGE
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_worldref.gif"
SIZE 320 160
EXTENT -180.0 -85.0 180.0 85.0
STATUS ON
COLOR -1 -1 -1
OUTLINECOLOR 255 0 0
END
#####################################
# Querymap object
#
QUERYMAP
STATUS on # draw query map
STYLE hilite # highlight selected feature
COLOR 255 255 0 # in yellow
SIZE 320 160
END
####################################
# Country layer
#
LAYER
NAME "Countries"
STATUS on
TYPE polygon
DATA "countries"
# A header or footer defined at the layer level is displayed
# if that layer is a query layer. It is displayed only once.
#
HEADER
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_countries_header.html"
FOOTER
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_countries_footer.html"
TOLERANCE 1 # must be within 1 tolerance unit
TOLERANCEUNITS miles # units for tolerance values is miles
CLASS
# A template defined at the class level is used to
# display the results for each reponse to a query. If a
# query results in N hits, then the template will be used
# N times. To be queriable a layer must specify a CLASS
# level template.
#
TEMPLATE
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_countries_query.html"
STYLE
COLOR 199 199 199
END
END # end class
END # end layer
####################################
# Cities layer
#
LAYER
NAME "Cities"
STATUS on
TYPE point
DATA "cities"
LABELITEM "CITY" # labels use value in column "CITY"
LABELCACHE on
# A header or footer defined at the layer level is displayed
# if that layer is a query layer. It is displayed only once.
#
HEADER
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_cities_header.html"
FOOTER
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_cities_footer.html"
TOLERANCE 1 # must be within 1 tolerance unit
TOLERANCEUNITS miles # units for tolerance values is miles
CLASS
# A template defined at the class level is used to display
# the results for each reponse to a query. If a result set
# contains N, then the template will be used N times.
#
TEMPLATE
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_cities_query.html"
STYLE
COLOR 0 0 0 # symbol color is black
END
LABEL
TYPE truetype # use truetype font
#FONT "arialbd" # use arial bold
FONT "arial-bold" # use arial bold
SIZE 8 # use 8 point size
COLOR 255 0 0 # color text red
BACKGROUNDCOLOR 255 255 255 # render text on white bg
MINDISTANCE 50 # labels > 50 pixels apart
POSITION lc # center labels below feature
ANTIALIAS true # antialias the text
END # end label
END # end class
# To use information stored in a DBF file external to a shape
# file requires a JOIN. You must identify the external file
# with the keyword TABLE. The NAME is the reference to use in
# the template file. To link the shape to the external DBF,
# FROM and TO specify the fields that must match.
JOIN
TABLE
"/home/g/i/gisel/public_html/files/maps/htdocs/fourth_join.dbf"
NAME "test-join"
FROM "CITY"
TO "CITY"
END
END # end layer
####################################
# Line layer for Country boundaries
#
LAYER
NAME "Boundaries"
STATUS default
TYPE line
DATA "countries"
CLASS
STYLE
COLOR 0 0 0
END
END # end class
END # end layer
####################################
# Annotation layer for Countries
LAYER
STATUS DEFAULT # this layer is always rendered
TYPE annotation
DATA "countries"
LABELITEM "STATE" # labels use value in column "STATE"
LABELCACHE on
CLASS # class renders line & label
STYLE
COLOR 0 0 0 # line color is black
END
LABEL
TYPE truetype # use truetype font
#FONT "arialbi" # use arial bold
FONT "arial-bold" # use arial bold - as defined in fonts.list
SIZE 8 # use 8 point szie
COLOR 0 0 0 # color text black
BACKGROUNDCOLOR 255 255 255 # render text on white bg
MINDISTANCE 50 # labels > 50 pixels apart
POSITION cc # labels in center of feature
ANTIALIAS true # antialias the text
END # end label
END # end class
END # end layer
END # end of map file
--
View this message in context:
http://www.nabble.com/Need-a-little-help-interpreting-an-error.-tp15944477p15944477.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users