Request: [html] tag in legend templates

Vincent Schut schut at SARVISION.COM
Mon Jan 17 09:55:31 EST 2005


Hi all,

I'm exploring the powers of cgi mapserver icm templates and html
legends, and first must say that I am impressed. Till now I used
mapscript, but in fact cgi mapserver is very powerfull...

I however feel one great omission: the possibility to have html in
between the different tags blocks in an html legend template, for
example to put an entire class block in one <div id=classblock> </div>
to ensure easy css styling of my legends.
My proposal is the following: could we have [html] [/html] tags to
construct arbitrary html tag blocks? Behaviour for these tags would be
similar as that of the header and footer blocks, except that they are
placed in the ouput where they were encountered in the input. E.g. if I
have this legend template:

[html]
<div id=classblock>
[/html]
[leg_class_html]
        <div id=class>
                <img src=[leg_icon width=25 height=10]> [leg_class_name]
        </div>
[/leg_class_html]
[html]
</div>
[/html]

this would result in a legend with all classes for the processed layer
are inside the <div id=classblock> </div> tags, while each seperate
class inself is also inside the <div id=class> </div> tags.

If this is a bad idea for reasons unknown to me (mere mortal) please let
me know, then I'll try to find some ugly javascript workaround...

Cheers,
Vincent.



More information about the mapserver-dev mailing list