[mapserver-dev] MapServer 8.0 Config File

Steve Lime sdlime at gmail.com
Wed Jun 16 15:21:53 PDT 2021

You could certainly store that in one of the hashes "as is" although that's
potentially a lot of overhead for storing that limited bit of information,
especially since you have to know the path to the configuration file in the
first place.

It seems to me that the most compelling reason for MapScript to leverage
the config file would be for the global section that Seth mentioned. To
deal with the globals we need to use the config data as part of the
initialization process - so it needs to be part of loading or creating a
map object. That way when you initialize the map you would, for example,
set the fontset and symbolset attributes based on the global values (if
present). Then those could be overridden as necessary. Some of the
environment settings around things like a global debug file and level could
also be useful in MapScript context.

So, we'd need to change the msLoadMap() function to take a config
parameter. This would be mandatory via the CGI and optional for MapScript.
I could see something like this (Perl):

  $config = new mapscript::configObj('path to config file');
  $map = new mapscript::mapObj('my.map', $config);

We could create a few helper methods associated with the config to get at
things but the use of the configuration should be pretty much automatic.


On Wed, Jun 16, 2021 at 9:34 AM Jeff McKenna <jmckenna at gatewaygeomatics.com>

> On 2021-06-16 11:06 a.m., Steve Lime wrote:
> > At the moment this has no impact on MapScript. I was thinking perhaps we
> > could add a method to optionally load a config file independently of a
> > mapfile. Thoughts?
> >
> I believe MapScript impacts was the first comment I had made on this
> months ago (and it is mentioned in the RFC draft also).
> For example: PHP SWIG MapScript requires a path to a .php file that
> contains all MapServer constants & functions (that is installed as part
> of the cmake steps).  For wishlist I'd like to see this new config file
> allow to set the path to MapScript's required .php file.
> -jeff
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20210616/26cd98fc/attachment.html>

More information about the mapserver-dev mailing list