Creating your MapServer .MAP file
In MapServer the .MAPÂ file is a workspace or project of layers that will be available. Â This is the base that iShare then performs queries against via the MapSource (XML) file.
This is a brief overview of how to create a .map file and also to test it to ensure that it is correctly configured.
The .MAP file is a text file that describes a variety of items or objects. Â Each object has a keyword to open it and a corresponding END to close it. Â
Comments are used with a #.
Object | Description | Mandatory |
---|---|---|
MAP | This is the all encompassing object. | Yes |
QUERYMAP | This is required if you wish to perform a Zoom to Polygon for My Area. | Yes |
OUTPUTFORMAT | Defines the output image type. This is optional UNLESS you are using ANTIALIASING / TRANSPARENCY – also for image quality we normally suggest this is implemented. It will increase the size of the output image but there is a trade off between quality and size.  More information can be found at the MapServer website: http://www.mapserver.org/mapfile/outputformat.html. | No |
WEB | Defines output paths required by iShare. | Yes |
LAYER | Most common object iShare use defining what data to show. | Yes |
LAYER -> CLASS | Allow classifications against datasets. | Yes |
LAYER -> CLASS -> STYLE | Define styles for features. | No |
LAYER -> CLASS -> LABEL | The Label class can allow for multiple columns to form an Expression for the label. | No |
LAYER -> CLASS -> EXPRESSION | If you wish to use more complicated styles for say OS MasterMap layers then you can use the following which will colour according to the value of a field name using EXPRESSION. | No |
LAYER -> FILTER | The Filter class allows you to split out data from your source map files. | No |
From version 5.2.0 you can edit your .map file directly from within Studio using the Map Editor .
For details of on how to configure your MapServer .MAP file please refer to the MapServer Mapfile documentation.