Personal tools
You are here: Home Documentation References

Mapfile Reference

Document Actions
MapFiles are the basic configuration mechanism for MapServer. This document contains a rundown of the keys and values that describe a mapfile.

All content on one page (useful for printing, presentation mode etc.)

  1. Introduction

    Important notes on using mapfiles.

  2. 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.

  3. 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.

  4. Grid

    The GRID object defines a map graticule as a LAYER. Starts with the keyword GRID and terminates with the keyword END.

  5. Include

    Defines a file to be included in the mapfile parsing.

  6. Join

    Defines how a specific join is handled. Starts with the keyword JOIN and terminates with the keyword END.

  7. 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.

  8. 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).

  9. 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.

  10. Map

    A MAP object defines the master object of the mapfile. It defines application/map wide parameters.

  11. OutputFormat

    This section discusses how output formats are defined and selected.

  12. Projection

    This object defines the coordinate system to display your data.

  13. QueryMap

    Defines a mechanism to map the results of a query. Starts with the keyword QUERYMAP and terminates with the keyword END.

  14. Reference Map

    Defines how reference maps are to be created. Starts with the keyword REFERENCE and terminates with the keyword END.

  15. Scalebar

    Defines how a scalebar should be built. Starts with the keyword SCALEBAR and terminates with the keyword END.

  16. Style

    This object holds parameters for symbolization. Multiple styles may be applied within a class.

  17. 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).

  18. Web

    Defines how a web interface will operate. Starts with the keyword WEB and terminates with the keyword END.

  19. 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

by Jeff McKenna last modified 2006-08-16 15:57

Powered by Plone