Personal tools
You are here: Home Documentation References PHP/Mapscript Class Reference Constants

2. Constants

Document Actions
Up one level
List of MapServer constants available.
  • Constant names and class member variable names are case-sensitive in PHP.
  • Several MapScript functions (all those that access files in the back end such as ms_newMapObj(), drawMap(), etc.) will affect the value of the current working directory (CWD) in the PHP environment. This will be fixed eventually but in the meantime you should be careful about these side-effects.

The following MapServer constants are available:

Boolean values:
    MS_TRUE, MS_FALSE, MS_ON, MS_OFF, MS_YES, MS_NO

Map units:
    MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD,
    MS_PIXELS

Layer types:
    MS_LAYER_POINT, MS_LAYER_LINE, MS_LAYER_POLYGON, 
    MS_LAYER_RASTER, MS_LAYER_ANNOTATION, MS_LAYER_QUERY,
    MS_LAYER_CIRCLE  MS_LAYER_TILEINDEX

Layer/Legend/Scalebar/Class Status:
    MS_ON, MS_OFF, MS_DEFAULT, MS_EMBED, MS_DELETE

Layer alpha transparency : allows alpha transparent pixmaps 
to be used with RGB map images
    MS_GD_ALPHA

Font types:
    MS_TRUETYPE, MS_BITMAP

Label positions:
    MS_UL, MS_LR, MS_UR, MS_LL, MS_CR, MS_CL, MS_UC, MS_LC,
    MS_CC, MS_AUTO, MS_XY

Bitmap font styles:
    MS_TINY , MS_SMALL, MS_MEDIUM, MS_LARGE, MS_GIANT

Shape types:
    MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON, MS_SHAPE_NULL

Shapefile types:
    MS_SHP_POINT, MS_SHP_ARC, MS_SHP_POLYGON, MS_SHP_MULTIPOINT

Query/join types:
    MS_SINGLE, MS_MULTIPLE

Querymap styles:
    MS_NORMAL, MS_HILITE, MS_SELECTED

Connection Types:
    MS_INLINE, MS_SHAPEFILE, MS_TILED_SHAPEFILE, MS_SDE, MS_OGR, 
    MS_TILED_OGR, MS_POSTGIS, MS_WMS, MS_ORACLESPATIAL, MS_WFS,
    MS_GRATICULE, MS_MYGIS

Error codes:
    MS_NOERR, MS_IOERR, MS_MEMERR, MS_TYPEERR, MS_SYMERR, 
    MS_REGEXERR, MS_TTFERR, MS_DBFERR, MS_GDERR, MS_IDENTERR, 
    MS_EOFERR, MS_PROJERR, MS_MISCERR, MS_CGIERR, MS_WEBERR, 
    MS_IMGERR, MS_HASHERR, MS_JOINERR, MS_NOTFOUND, MS_SHPERR, 
    MS_PARSEERR, MS_SDEERR, MS_OGRERR, MS_QUERYERR, MS_WMSERR, 
    MS_WMSCONNERR, MS_ORACLESPATIALERR, MS_WFSERR, MS_WFSCONNERR, 
    MS_MAPCONTEXTERR, MS_HTTPERR, MS_WCSERR

Symbol types:
    MS_SYMBOL_SIMPLE,  MS_SYMBOL_VECTOR, MS_SYMBOL_ELLIPSE,
    MS_SYMBOL_PIXMAP, MS_SYMBOL_TRUETYPE, MS_SYMBOL_CARTOLINE
    
Image Mode types (outputFormatObj):
    MS_IMAGEMODE_PC256, MS_IMAGEMODE_RGB, MS_IMAGEMODE_RGBA, 
    MS_IMAGEMODE_INT16, MS_IMAGEMODE_FLOAT32, MS_IMAGEMODE_BYTE, 
    MS_IMAGEMODE_NULL   
by Jeff McKenna last modified 2005-12-05 14:15

Powered by Plone