Yep, should be simple enough to keep a tab on the visible layers as
they're drawn.  Well, I'll just stick to querying each layer by
hand for now.  Where can I go to add a feature request?<br>
<br>
Do we also want to put this into the MapScript API where each class can have something like:<br>
<br>
$class->hasDataInCurrentMapExtents;  // Or something more concise.  :)<br>
<br>
And layers have the equivalent where it's false if each of it's classes are false for the above attribute.<br>
<br>
Thanks.<br>
-Abe<br><br><div><span class="gmail_quote">On 9/1/05, <b class="gmail_sendername">Stephen Woodbridge</b> <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Abe,<br><br>I think this would be a very valuable extension and it would not be that<br>hard to implement. All that you would need is a bit array that is zeroed<br>before a draw request where each bit represents a unique layer-class,
<br>then as objects are drawn you would OR 1 into the bit array for the<br>layer-class index if/when an object is drawn. Then you would need to be<br>able to query the bit array for a given layer-class index to see if it<br>
was drawn.<br><br>-Steve W.<br><br>Abe Gillespie wrote:<br>> I build my legends by hand with PHP code because the native<br>> functionality just isn't good enough for what I need.  Unfortunately I<br>> still can't get it perfect because of what I think is missing MapServer
<br>> functionality.  Currently my legends are just too big for printing.  Is<br>> there a way to tell whether a certain class is visible w/i the current<br>> view?  Now I don't mean whether the class is within it's scale limits
<br>> (MIN or MAXSCALE).  Rather can one tell if a layer / class has any data<br>> w/i the current view.  For instance, I may have a fire hydrant layer w/o<br>> any scale dependencies.  But I might be zoomed into a field way out in
<br>> the country side.  So, yeah, technically the layer can be seen at that<br>> 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><br></blockquote></div><br>