[mapserver-dev] Dynamicaly writing Mapfiles for WMS-Servers

Lars Lingner ml at lingner.eu
Mon Feb 15 12:52:55 EST 2010

Stephan Holl schrieb:
> * Is there a better way to realize a robust way of modfying mapfiles on
>   the fly (without using mapscript).

I don't know if its a better way, but depending on what you want to
change, you could use runtime substitution [1]
Define a "template layer" which gets its values by variables.

With some environment variables in an wrapper script you are able to
first generate your mapfile and then set the path in the wrapper. Or
define multiple wms services with each having an own mapfile and just
changing one parameter in the request url. [2]

As a last idea the use of a SLD comes to mind, but only then when you
want to change the output of MapServer. You cant change data sources, so
that its maybe not a solution.


[1] http://mapserver.org/cgi/runsub.html
[2] http://n2.nabble.com/Mapserver-Security-tp3344398p3344939.html

More information about the mapserver-dev mailing list