Layers do not show up?
Jeff Portwine
jdport at VERITIME.COM
Thu Feb 10 13:25:22 PST 2005
It's not generally a good idea to put all of your files in the cgi-bin directory. You should only have the mapserv directory there, and your other files in your normal html directory like /var/www/<directory> or something like that. The Imagepath is the complete path to the temp directory where your map images will be stored... the ImageURL would be the URL to the images. For example you might have something like
Imagepath /var/www/map/tmp
ImageURL /map/tmp.
The fontset is only used for labels if you have any text labels on your map.
Your legend likely doesn't show up because you haven't named any of your classes. Only named classes will show up on a legend.
-Jeff
----- Original Message -----
From: w m
To: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: Thursday, February 10, 2005 3:44 PM
Subject: [UMN_MAPSERVER-USERS] Layers do not show up?
Hi,
I was making a simple map file. I'm able to display the map, but when i add the "landcover" layers, they don't show up on the map. I'm not sure why it doesn't show up???
Also, does it matter if I include the fontset? what is it used for?
WHat is the purpose of IMAGEPATH and IMAGEURL? If I don't include these it doesn't make a difference. Why is that?
The legend doesn't show up either.
It can be viewed here: http://132.205.108.60
I put all my files in the cgi-bin along with mapserver.
NAME europe
STATUS ON
IMAGETYPE PNG
IMAGECOLOR 255 255 255 # white background
EXTENT 407.997812 4103475.750 443135.000 4157027.250
#FONTSET "/usr/local/etc/htdocs/mapserver/fonts/fonts.list"
SIZE 500 500
SHAPEPATH "/var/www/cgi-bin"
# Set your template file to the name of YOUR template file
# you can leave the image path and image URL alone
WEB
TEMPLATE "/var/www/html/index.html"
IMAGEPATH "/usr/local/etc/htdocs/tmp/"
IMAGEURL "/tmp/"
END
LEGEND
STATUS ON
LABEL
TYPE TRUETYPE
FONT arial
COLOR 0 0 0
SIZE 10
ANTIALIAS TRUE
END
END
# LAYER DEFINITIONS ---------------------------------------------
LAYER
NAME "myoutline"
DATA europa
STATUS DEFAULT # Show the layer at all times
TYPE LINE
CLASS
COLOR 0 0 0
OUTLINECOLOR 255 120 60
END
END
LAYER
NAME "credits"
STATUS DEFAULT
TRANSFORM FALSE
TYPE ANNOTATION
FEATURE
POINTS
50 480 # changes the location of the text
END
TEXT 'Europe Map'
END
CLASS
LABEL
TYPE BITMAP
POSITION CR
COLOR 255 120 60
END
END
END
LAYER #
NAME "mylandcover"
DATA nhtm93s3
STATUS ON # show layer, but allow it to be turned off
TYPE POLYGON # choices for type are POLYGON, LINE and POINT
CLASSITEM "LANDCOVER"
CLASS # water
NAME "Water"
EXPRESSION 'Water' # match only those where [landcover]='Water'
COLOR 225 225 255
OUTLINECOLOR 0 0 0
END
CLASS # grassland
NAME "Grassland"
EXPRESSION /Planted*/ # search for landcovers starting with Planted
COLOR 0 240 0
OUTLINECOLOR 0 0 0
END
CLASS # forest
NAME "Forest"
EXPRESSION /Forest*/
COLOR 200 140 0
OUTLINECOLOR 0 0 0
END
CLASS # salt marsh
NAME "Salt Marsh"
EXPRESSION /Salt*/
COLOR 0 200 140
OUTLINECOLOR 0 0 0
END
CLASS # sand
NAME "Sand"
EXPRESSION /Bare*/
COLOR 240 240 240
OUTLINECOLOR 0 0 0
END
END # end of layer object
LAYER
NAME "myroads"
DATA rtf100k
STATUS ON
TYPE line
CLASS
NAME Roads
COLOR 200 0 200
OUTLINECOLOR 0 0 0
END # end of class
END # end of layer object
END # end of map file
------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050210/8333fd8b/attachment.htm>
More information about the MapServer-users
mailing list