[Mapserver-users] legend not show up from a WMS layer

we wei mapgisnewbies at yahoo.com
Wed Mar 24 13:00:11 EST 2004


Hi all,

I got a newbie question about legend.  I have a map
file and one of the layers is using WMS as connection
type.  All the other layers are just using shape file
as data source.  And I have a template file for
displaying legends.

Here is the content of the legend template file:

[leg_layer_html opt_flag=15]
[if name=layer_type oper=neq value=4]
  <tr>
    <td><input type="checkbox"
name="legendlayername[]" value="[leg_layer_name]"[if
name=layer_status value=1] CHECKED[/if]></td>
    <td><img src="[leg_icon width=22 height=18]"
width="22" height="18"></td>
    <td nowrap>[metadata name=wms_title][if
name=wms_title oper=isnull][leg_layer_name][/if]</td>
  </tr>
[/if]
[/leg_layer_html]

All the layers with shape file as data sources can
display their legend correctly, but not the WMS one
thought.  From what I understand, [leg_icon] is used
to display the legend images and it will look into the
setting  in the first class of each layer.  That's why
I suspect that the legend of the WMS doesn't show is
due to the missing of class setting in this layer. 
When I try to put in a class object in the WMS layer,
this change make my result map look funny; the result
map just filled up with one single color which is
specified by the class object I just put in.  

I guess I set up something wrongly here. 

Could anyone give me some hints on this problem to
make the legend show up?  Also, could I make the
mapserver to get the legend setting from remote WMS
server's mapfile instead of my mapfile here ?  I am
new to this stuffs, if I misunderstood anything, just
point me out.  Any help would be much appreciated.

Thanks in advance,
wei            

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html



More information about the mapserver-users mailing list