Changing layer templates on the fly

Xin crazygecko at GMAIL.COM
Fri Nov 4 04:56:38 EST 2005


David,

Thanks! I remember reading that somewhere now, didn't think too much of it
since we were able to change templates onthefly, just not header/footers.

I've just tested it out, it works like a dream. One thing though, the
regular expression has to be in quotes. Having /./ by itself doesn't seem to
work. My line reads: TEMPLATEPATTERN "."


thanks again.

Xin

ps. I am using 4.6! typo

On 02/11/05, Fawcett, David <David.Fawcett at state.mn.us> wrote:
>
> 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/20051104/40761974/attachment.html


More information about the mapserver-users mailing list