10.
Map
Up one level
- ANGLE [double]
Angle, given in degrees, to rotate the map. Default is 0. The rendered map will rotate in a clockwise direction. The following are important notes:
- Requires a PROJECTION object specified at the MAP level and for each LAYER object (even if all layers are in the same projection).
- Requires MapScript (SWIG, PHPMapscript). Does not work with CGI mode.
- If using the LABEL object's ANGLE or the LAYER object's LABELANGLEITEM parameters as well, these parameters are relative to the map's orientation (i.e. they are computed after the MAP object's ANGLE). For example, if you have specified an ANGLE for the map of 45, and then have a layer LABELANGLEITEM value of 45, the resulting label will not appear rotated (because the resulting map is rotated clockwise 45 degrees and the label is rotated counter-clockwise 45 degrees).
- More information can be found on the MapRotation Wiki Page.
- CONFIG [key] [value]
This can be used to define the location of your EPSG files for the PROJ.4 library. Setting the [key] to PROJ_LIB and the [value] to the location of your EPSG files will force PROJ.4 to use this value. Using CONFIG allows you to avoid setting environment variables to point to your PROJ_LIB directory. Here are some examples:
Unix
CONFIG "PROJ_LIB" "/usr/local/share/proj/"
Windows
CONFIG "PROJ_LIB" "C:/somedir/proj/nad/"
Any other value will be passed on to CPLSetConfigOption(). This provides customized control of some GDAL and OGR driver behaviours. Details on such options would be found in specific GDAL driver documentation.
- DATAPATTERN [regular expression]
- This defines a regular expression to be applied to requests to change DATA parameters via URL requests (i.e. map_layername_data=...). If a pattern doesn't exist then web users can't monkey with support files via URLs. This allows you to isolate one application from another if you desire, with the default operation being very conservative. See also TEMPLATEPATTERN.
- DEBUG [on|off]
Enables debugging of the map object. Verbose output is generated and sent to the standard error output (STDERR) or the MapServer logfile if one is set using the LOG parameter in the WEB object. Apache users will see timing details for drawing in Apache's error_log file.
Requires MapServer to be built with the DEBUG=MSDEBUG option (--with-debug configure option).
- EXTENT [minx] [miny] [maxx] [maxy]
- The spatial extent of the map to be created. In most cases you will need to specify this, although mapserver can sometimes (expensively) calculate one if it is not specified.
- FONTSET [filename]
- Filename of fontset file to use. Can be a path relative to the mapfile, or a full path.
- IMAGECOLOR [r] [g] [b]
- Color to initialize the map with (i.e. background color). When transparency is enabled (TRANSPARENT ON) for the typical case of 8-bit pseudocolored map generation, this color will be marked as transparent in the output file palette. Any other map components drawn in this color will also be transparenct, so for map generation with transparency it is best to use an otherwise unused color as the background color.
- IMAGEQUALITY [int]
- Deprecated Use FORMATOPTION "QUALITY=n" in the OUTPUTFORMAT declaration to specify compression quality for JPEG output.
- IMAGETYPE [gif|png|jpeg|wbmp|gtiff|swf|userdefined]
- Output format to generate. See details in the OUTPUTFORMAT section for available formats. The name here must match the 'NAME' of a user defined or internally generated OUTPUTFORMAT section.
- INTERLACE [on|off]
- Deprecated Use FORMATOPTION "INTERLACE=ON" in the OUTPUTFORMAT declaration to specify if the output images should be interlaced.
- LAYER
- Signals the start of a LAYER object.
- LEGEND
- Signals the start of a LEGEND object.
- MAXSIZE [integer]
- Sets the maximum size of the map image. This will override the default value. For example, setting this to 2048 means that you can have up to 2048 pixels in both dimensions (i.e. max of 2048x2048).
- NAME [name]
- Prefix attached to map, scalebar and legend GIF filenames created using this MapFile. It should be kept short.
- PROJECTION
- Signals the start of a PROJECTION object.
- QUERYMAP
- Signals the start of a QUERYMAP object.
- REFERENCE
- Signals the start of a REFERENCE MAP object.
- RESOLUTION [int]
- Sets the pixels per inch for output, only affects scale computations and nothing else, default is 72.
- SCALE [double]
- Computed scale of the map. Set most often by the application.
- SCALEBAR
- Signals the start of a SCALEBAR object.
- SHAPEPATH [filename]
- Path to the directory holding the shapefiles or tiles. There can be further subdirectories under SHAPEPATH.
- SIZE [x][y]
- Size in pixels of the output image (i.e. the map).
- STATUS [on|off]
- Is the map active? Sometimes you may wish to turn this off to use only the reference map or scale bar.
- SYMBOLSET [filename]
- Filename of the symbolset to use. Can be a path relative to the mapfile, or a full path.
- SYMBOL
- Signals the start of a SYMBOL object.
- TEMPLATEPATTERN [regular expression]
- This defines a regular expression to be applied to requests to change TEMPLATE parameters via URL requests (i.e. map_layername_template=...). If a pattern doesn't exist then web users can't monkey with support files via URLs. This allows you to isolate one application from another if you desire, with the default operation being very conservative. See also DATAPATTERN.
- TRANSPARENT [on|off]
- Deprecated Use FORMATOPTION "TRANSPARENT=ON" in the OUTPUTFORMAT declaration to specify if the output images should be transparent.
- UNITS [feet|inches|kilometers|meters|miles|dd]
- Units of the map coordinates. Used for scalebar and scale computations.
- WEB
- Signals the start of a WEB object.
DEBUG can corrupt output...
According to Daniel Morissette, IIS often appends stderr to the return stream which can result in a corrupt image or an invalid XML file.
In MS4, you can turn DEBUG OFF (the default, I believe) or set MS_ERRORFILE to a file and not direct it to stderr.