[Mapserver-users] Newbie question: what are TEMPLATEs for, and how to use them ?

woodbri at swoodbridge.com woodbri at swoodbridge.com
Sat Dec 14 09:27:13 EST 2002


Lars,

Templates are used if you are using mapserver in CGI mode  instead of 
using mapscript. There is a template reference manual on the 
mapserver website that lists all the variables that mapserver will 
replace with values when rendering a template for you. Look at the 
mapserver demo for an example of template usage.

If you are using mapscript, you obviously don't need template files, 
BUT you should still include a TEMPLATE "void" line in your map file 
as some functions in mapserver try to be smart will skip over the 
layer if it does not have a TEMPLATE line defined. I think this only 
happens on queries, but there could be some other places also.

-Steve W.

On 14 Dec 2002 at 14:56, Lars V. Nielsen wrote:

> Hi list,
> 
> One issue about Mapserver still eludes me: TEMPLATES
> 
> A template is apparently a reference to a HTML page, but what does
> this HTML page need to contain ? And is it a complete web page, or
> does it contain HTML snippets ? And what's the overall purpose of
> these templates in Mapserver ?
> 
> I'm struggling to get a legend displayed, sofar without any luck. It
> persistently comes out blank. Is this problem in any way tied to the
> missing TEMAPLTE references in my MAP file ?
> 
> Best regards/Med venlig hilsen
> Lars V. Nielsen
> GisPro, Denmark
> http://www.gispro.dk/
> http://hjem.get2net.dk/lars-online/
> WGS84: 10.20'40"E 55.20'20"N
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 





More information about the mapserver-users mailing list