SWIG MapScript API Reference¶
- Author:
Sean Gillies
- Author:
Steve Lime
- Contact:
steve.lime at dnr.state.mn.us
- Author:
Frank Warmerdam
- Contact:
warmerdam at pobox.com
- Author:
Umberto Nicoletti
- Contact:
umberto.nicoletti at gmail.com
- Author:
Tamas Szekeres
- Contact:
szekerest at gmail.com
- Author:
Daniel Morissette
- Contact:
dmorisette at mapgears.com
- Author:
Jeff McKenna
- Contact:
jmckenna at gatewaygeomatics.com
- Author:
Seth Girvin
- Contact:
sethg at geographika.co.uk
- Last Updated:
2023-06-13
Introduction¶
This documentation is for the MapScript interface to MapServer generated by SWIG.
To make the document as agnostic as possible, we refer to the following types: int, float, and string. There are yet no MapScript methods that return arrays or sequences or accept array or sequence arguments.
We will use the SWIG term immutable to indicate that an attribute’s value is read-only.
Note that because of the way that MapScript is generated many confusing, meaningless, and even dangerous attributes might be exposed by objects.
Warning
As of the MapServer 8.0.0 release PHP support is only available through MapServer’s SWIG API. The unmaintained native PHP MapScript support was removed.
Note
PHP support is included in the SWIG API as of the MapServer 7.4.0 release. PHP 8.2 and PHP 8.1 are currently supported with MapServer 8.0.1.
Appendices¶
Language-specific extensions are described in the following appendices
MapScript Classes¶
|
|
|
|
|
An object representing a color. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MapScript Functions¶
|
Allow Python to access the directory containing the MapServer DLL (for Python on Windows only) |
|
Creates map objects from mapfile strings. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MapScript Constants¶
Align¶
|
|
Allocations¶
Comparison¶
Compop¶
|
|
Config¶
|
|
Connection¶
Db Connection¶
|
Dbf Fields¶
|
|
Debug¶
Error¶
|
|
|
File¶
|
|
Font Type¶
|
|
Function¶
|
Geos¶
Image Mode¶
Join¶
|
|
Label Binding¶
Label Offset¶
|
|
Label Size¶
|
Layer¶
Legend¶
|
|
Limiters¶
|
|
Line Join¶
Logical Control¶
Measure Shape¶
Missing¶
Parse¶
|
|
Position¶
Projections¶
|
|
|
Query Mode¶
|
|
|
Query Type¶
Render¶
Render Mode¶
|
|
Request Type¶
|
|
Return Codes¶
|
|
|
Scalebar¶
Shapefile¶
|
Shape Type¶
|
|
Style Binding¶
Style Offset¶
|
|
Symbol¶
Token Binding¶
Token Literal¶
|
Token Logical¶
|
|
|
Transform¶
|
Units¶
Version¶
|
|