Main configuration file
- Add the following content to your /usr/lib/cgi-bin/main.cfg file
- in the [main] section:
dataPath = /var/www/temp/
mapserverAddress=http://localhost/cgi-bin/mapserv
The dataPath directory should exists and be writable by apache user. In this directory, a symbols.sym file have to be present, containing the following:
SYMBOLSET
SYMBOL
NAME "circle"
TYPE ellipse
FILLED true
POINTS
1 1
END
END
END
Only one symbol definition is required with any name, used for WMS service output.
Now, your ZOO-Kernel get the MapServer support ready to be used. Note that if you don’t add the mapserverAddress then it imply the ZOO-Kernel will segfault (checking NULL value should correct this behavior).
Here you can optionally add a msOgcVersion parameter to specify which version of the OGC WebService you want to use for each services. For example, if you want to force to version 1.0.0, you can set the following in the [main] section of your main.cfg file:
Service configuration file
To activate MapServer WebServices output for a service, you have to add a specific parameter in the <Default> or <Supported> block: useMapserver. This can take the value true or should not appear. If true, it means that the output result is an OGR / GDAL compatible datasource and you want it to be outputted as an OGC web server instance (WMS/WFS/WCS).
You get an optional parameter, to use a custom MapServer style block (used for vector datasource only): msStyle. For example:
msStyle = STYLE COLOR 125 0 105 OUTLINECOLOR 0 0 0 WIDTH 3 END
You get the same optional parameter msOgcVersion as for the main.cfg. This will specify that this is the specific protocol version the service want to use (so you may set also locally to service rather than globally).
When you add useMapserver option to an output <Default> or <Supported> block, then you have to know what are the sensible mimeType:
- text/xml: will imply that the output data will be accessible through a WFS GetFeature request (default protocol version 1.1.0)
- image/tiff: will imply that the output data will be accessible through a WCS GetCoverage request (default protocol version 2.0.0)
- any other mimeType coupled with useMapserver option: will imply that the output data will be accessible trhough a WMS GetMap request (you have to limit yourself to what your MapServer installation support, GetCapabilities? request give information of supported output mimeType) (default protocol version 1.3.0)