Changing layer templates on the fly

Fawcett, David David.Fawcett at STATE.MN.US
Wed Nov 2 06:14:17 PST 2005


Xin, 
 
I assume that you are really are using MapServer 4.6. If you are
actually using version 2.6 I suggest that you upgrade for many, many
reasons.  
 
Take a look at TEMPLATEPATTERN
http://ms.gis.umn.edu/docs/reference/mapfile/mapObj#templatepattern
 
In your mapfile, you need to set a template pattern that will match your
template name.  You are not able to substitute template names through
the URL unless you set an appropriate templatepattern.  
 
David.

	-----Original Message-----
	From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Xin
	Sent: Wednesday, November 02, 2005 5:36 AM
	To: MAPSERVER-USERS at LISTS.UMN.EDU
	Subject: [UMN_MAPSERVER-USERS] Changing layer templates on the
fly
	
	
	Hi,
	
	I'm using MapServer 2.6 via CGI, it's working really well.
After reading about changing attributes on-the-fly via CGI parameters
I've been hooked on it.  Changing everything from layer tolerance
(map_mylayer_tolerance=10) to templates
(map_mylayer_template=file.html).  But for the life of me, I can't
figure out how to change header templates! It simply doesn't work.
	
	I've tried searching in the mailing list, but there is nothing.
map_mylayer_header=header.html just doesn't work.  Specifying the header
attribute in the mapfile works file, but I'd rather change it
dynamically.  I realise the layer portion is case-sensitive, so that's
not the problem.
	
	Your help is greatly appreciated.
	
	Xin
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051102/5bb73d01/attachment.htm>


More information about the MapServer-users mailing list