I build my legends by hand with PHP code because the native
functionality just isn't good enough for what I need. 
Unfortunately I still can't get it perfect because of what I think is
missing MapServer functionality.  Currently my legends are just
too big for printing.  Is there a way to tell whether a certain
class is visible w/i the current view?  Now I don't mean whether
the class is within it's scale limits (MIN or MAXSCALE).  Rather
can one tell if a layer / class has any data w/i the current
view.  For instance, I may have a fire hydrant layer w/o any scale
dependencies.  But I might be zoomed into a field way out in the
country side.  So, yeah, technically the layer can be seen at that
scale, but no fire hydrants are actually in the view.<br>
<br>
If this doesn't exist, shall I issue a feature request?<br>
<br>
Thanks.<br>
-Abe<br>