[Mapserver-users] HTML Legends as lists

Liz Godwin godwinl at agr.gc.ca
Mon Apr 5 09:24:52 EDT 2004


Thanks,

I'd thought of this, but I just wanted to avoid having to duplicate a
lot of mapfile tags as metadata.  In my mind, I shouldn't have to.  (I'm
a picky user)

Maybe this component will change in the future...?  

Liz

>>> "Ryan, Adam" <ARyan at co.linn.or.us> 04/02/04 06:33PM >>>
Liz,

I think you might be underestimating the power of the HTML Legend.

Remember, any layer can have any number of metadata tags to help you
guide
layers them into the right group, div, list, whatever.  Also, using
javascript, you could build arrays with the repeating HTML Legend
rather
than write anything out onto the document.  Use the footer to write it
out.


As for the collapse, expand, find a couple of nice gifs (+,-) and do
something like
Function colexp(id){
	theE = document.getElementById(id);
	theE.style.display (theE.style.display=="none") ?
"block":"none";
}

Use the group name (not necessarily the mapserver group, a metadata
group of
your own) and the layer name as a unique id.

Or something like that.

Adam 


-----Original Message-----
From: Liz Godwin [mailto:godwinl at agr.gc.ca] 
Sent: Friday, April 02, 2004 12:16 PM
To: mapserver-users at lists.gis.umn.edu 
Subject: [Mapserver-users] HTML Legends as lists


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

_______________________________________________
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