SWIGMapScript: mapObj.processTemplate Input Parameters
Steve Lime
steve.lime at DNR.STATE.MN.US
Thu Oct 7 14:25:35 PDT 2004
While I agree that there are other more powerful templating libraries
there is also a
lot of code behind MapServer templates that make this worthwhile to
fix. Regardless
of how powerful the external tool is one will still have to write 100's
of lines of code
to do what MapServer templates already do. Seems stupid to require
folks to do that.
I can't believe there aren't standard typemaps in SWIG to convert
arrays of strings
to char **. Seems that just about everyone would want that. My vote
would be
to file a bug and get this fixed...
BTW The names and values arrays are web application parameter lists.
Templates
should run ok without them for the most part. What would be lost is
pass through
substitutions like [map].
Steve
>>> Sean Gillies <sgillies at FRII.COM> 10/7/2004 9:14:45 AM >>>
On Oct 7, 2004, at 3:18 AM, GeoIT wrote:
> Hi Mapserver experts,
> I want to use mapObj.processTemplate from Java Mapscript to receive
the
> processed HTML Template and let mapserver produce the according
images.
> I managed to get a valid typemapping so that I can supply the
necessary
> parameters to the method in the form of int and String[].
> Now the question: What do the parameters "String[] names", "String[]
> values"
> and "int numitems" mean ?
> What "items", "names" and "values" are meant here ?
>
> Please advise.
>
> Kind regards
> Andreas Paukner-Ruzicka
>
As you noticed, template processing in SWIG mapscript doesn't
really work without these typemaps. I really don't know why
the method has remained for so long in a non-working state, but
clearly people have not been using it. Otherwise the typemaps
would exist.
I think that most users use a better templating system in their
applications. That would be HTML::Template or Mason for Perl,
PSP or Zope page templates for Python. I'm sure that Java has
a wide array of templating libraries, and strongly suggest that
you use these. They are more powerful and flexible than
Mapserver's templating and because they have larger user bases,
will be better tested and have fewer bugs.
cheers,
Sean
--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies
More information about the MapServer-users
mailing list