Loading a mapfile from a string...

Jan Hartmann j.l.h.hartmann at UVA.NL
Wed Apr 18 09:52:47 EDT 2007


This is a *very* good idea IMHO. Gives us the possibility to dynamically 
construct mapfiles from database records, and solves tons of problems 
regarding immense mapfiles and mapdatabases.

Jan

Dr. J. Hartmann
Department of Geography
Uniersity of Amsterdam

Steve Lime wrote:
> Hi Folks: I've been screwing around with getting mapserver to ingest a mapfile stored in a string buffer rather than a file. In theory you could build up a configuration from text snippets or database output rather than manipulating objects directly. The code could almost do this in the past but needed some reorganization to re-use as much as possible. The result is a new function called msLoadMapFromString. I took the opportunity to fix some naming wierdness in mapfile.c and to clean up lexer initialization a bit. In otherwords I'm sitting on a fair number of minor changes to mapfile.c and maplexer.l (with a few other small edits elsewhere). Is this a big enough deal to warrant a RFC or can I just commit?
> 
> Steve
> 
> BTW A sample perl snippet might look like (mapscript integration isn't part of these changes other than exposing the function):
> 
> $buffer = "MAP ... END";
> $map = $mapscript::msLoadMapFromString($buffer, undef); # takes the buffer and an optional directory (location of symbols...)
> 



More information about the mapserver-dev mailing list