Mapfile Reference
All content on one page (useful for printing, presentation mode etc.)
-
Introduction
Important notes on using mapfiles.
-
Class
Defines thematic classes for a given layer and each layer must have at least one class. In cases with more than one class, membership is determined using attribute values and expressions. Starts with the keyword CLASS and terminates with the keyword END.
-
Feature
Defines inline features. You can use inline features when it's not possible (or too much trouble) to create a shapefile. Inline features can also be built via urls or forms. Starts with the keyword FEATURE and terminates with the keyword END.
-
Grid
The GRID object defines a map graticule as a LAYER. Starts with the keyword GRID and terminates with the keyword END.
-
Include
Defines a file to be included in the mapfile parsing.
-
Join
Defines how a specific join is handled. Starts with the keyword JOIN and terminates with the keyword END.
-
Label
This object is used to define a label, which is in turn usually used to annotate a feature with a piece of text. Labels can however also be used as symbols through the use of various TrueType fonts.
-
Layer
The most used object in a MapFile, this one describes layers used to make up a map. Layers are drawn in their order of appearance in the MapFile (first layer is at the bottom, last in on top).
-
Legend
Defines how a legend is to be built. Legend components are built automatically from class objects from individual layers. Starts with the keyword LEGEND and terminates with the keyword END.
-
Map
A MAP object defines the master object of the mapfile. It defines application/map wide parameters.
-
OutputFormat
This section discusses how output formats are defined and selected.
-
Projection
This object defines the coordinate system to display your data.
-
QueryMap
Defines a mechanism to map the results of a query. Starts with the keyword QUERYMAP and terminates with the keyword END.
-
Reference Map
Defines how reference maps are to be created. Starts with the keyword REFERENCE and terminates with the keyword END.
-
Scalebar
Defines how a scalebar should be built. Starts with the keyword SCALEBAR and terminates with the keyword END.
-
Style
This object holds parameters for symbolization. Multiple styles may be applied within a class.
-
Variable Substitution
New in MapServer 4.0, variables can be substituted within mapfile parameter values. At this time, cookie and CGI parameter values are supported. This allows mapserver mapfiles to be aware of a user's cookies (Good for implementing security), or non-mapserver request parameters (Good for integrating with other systems).
-
Web
Defines how a web interface will operate. Starts with the keyword WEB and terminates with the keyword END.
-
Article Info
Document information (version, author, etc.)
All content on one page (useful for printing, presentation mode etc.)
This Reference Manual applies to: MapServer 4.2, MapServer 4.4, MapServer 4.6, MapServer 4.8, MapServer 4.10