[Mapserver-users] HTML Legends as lists

Liz Godwin godwinl at agr.gc.ca
Fri Apr 2 15:16:18 EST 2004


Hello all!

I've been looking into making a collapsable legend.
I have groups of layers, each of which have detailed class
information.

Now.. I can make an HTML legend work just fine.  It's the collapsing
that's tricky.

Currently the HTML legend works that only the code between the
repeating sections is used, and only certain tags are available within
repeating sections.  These two things are preventing me from making this
an easy solution.

I'd like to be able to create a heirachical list such that my group
knows that it's children are it's layers with the same group, and the
layers know which classes are their own.  The way to do this would be to
add <ul> tags around my layers and classes.  BUT I can't.

An alternative (but to me merely a temp. workaround) to this would be
to give an identifier to each layer and class that of it's parent so
that it could be found using some javascript, but alas, my group info
isn't available to my layer in the HTML template file.

Oh Mapserver Gurus...please tell me this would be something simple to
implement.  I think a lot of other people would be interested in this. 
Lists are quickly becomming a popular display method in web pages
instead of tables.

Cheers,

Liz Godwin




More information about the mapserver-users mailing list