[mapserver-users] HTML Legend, Hide Out of Scale Class
Nolte, Tim
Tim.Nolte at ipcswirelessinc.com
Tue Sep 8 09:59:00 PDT 2009
I've spent a good part of my morning scouring the internet trying to
find the solution to my problem. I have an HTML legend that is used by
the Chameleon framework. I can't for the life of me figure out how to
make sure that the out-of-scale (non-visible) classes don't show up in
the legend. No matter what I've tried it is showing all the scales for
my layer(s). Can anyone give me a clue what I'm missing? Here's my
settings/code:
Mapfile:
CLASSITEM "evdo_implemented"
CLASS
NAME on_air_1x
TITLE "1X On-Air"
EXPRESSION "No"
MINSCALE 0
MAXSCALE 1200000
SYMBOL "cellsite-1x"
COLOR 0 208 104
OUTLINECOLOR 0 0 0
SIZE 12
LABEL
TYPE TRUETYPE
FONT "sans"
SIZE 7
POSITION CR
OFFSET 0 2
ANGLE AUTO
BUFFER 3
MINDISTANCE 30
MINFEATURESIZE 10
COLOR 0 0 0
OUTLINECOLOR 245 245 231
SHADOWSIZE 3 3
BACKGROUNDSHADOWSIZE 1 -1
END
END
CLASS
NAME on_air_evdo
TITLE "EVDO On-Air"
EXPRESSION "Yes"
MINSCALE 0
MAXSCALE 1200000
SYMBOL "cellsite-evdo"
COLOR 0 208 104
OUTLINECOLOR 0 0 0
SIZE 10
LABEL
TYPE TRUETYPE
FONT "sans"
SIZE 7
POSITION CR
OFFSET 0 2
ANGLE AUTO
BUFFER 3
MINDISTANCE 30
MINFEATURESIZE 10
COLOR 0 0 0
OUTLINECOLOR 245 245 231
SHADOWSIZE 3 3
BACKGROUNDSHADOWSIZE 1 -1
END
END
CLASS
NAME on_air_1x
TITLE "1X On-Air"
EXPRESSION "No"
MINSCALE 1200001
MAXSCALE 6000000
SYMBOL "cellsite-1x"
COLOR 0 208 104
OUTLINECOLOR 0 0 0
SIZE 10
END
CLASS
NAME on_air_evdo
TITLE "EVDO On-Air"
EXPRESSION "Yes"
MINSCALE 1200001
MAXSCALE 6000000
SYMBOL "cellsite-evdo"
COLOR 0 208 104
OUTLINECOLOR 0 0 0
SIZE 8
END
HTML Legend:
[leg_header_html][/leg_header_html]
[leg_group_html opt_flag=0][if name=static_legend oper=isset]<p
style="margin:6px 0 2px
0;font-weight:bold;vertical-align:middle;">[leg_group_name]</p>[/if][/le
g_group_html]
[leg_layer_html opt_flag=0][if name=layer_group oper=neq value="Cell
Sites"][if name=static_legend oper=isset][if name=layer_visible
value=1]<p style="margin:0 0 0 12px;padding:2px
0;vertical-align:middle;font-weight:normal;">[if name=signal_strength
oper=isset]<img src=[leg_icon] style="vertical-align:middle;"
title="[metadata name=signal_strength]">[/if][if name=signal_strength
oper=isnull]<img src=[leg_icon] style="vertical-align:middle;">[/if]
[leg_layer_name]</p>[/if][/if][/if][/leg_layer_html]
[leg_class_html opt_flag=14][if name=layer_group oper=eq value="Cell
Sites"][if name=static_legend oper=isset][if name=layer_visible
value=1]<p style="margin:0 0 0 12px;padding:2px
0;vertical-align:middle;font-weight:normal;">[if name=signal_strength
oper=isset]<img src=[leg_icon] style="vertical-align:middle;"
title="[metadata name=signal_strength]">[/if][if name=signal_strength
oper=isnull]<img src=[leg_icon] style="vertical-align:middle;">[/if]
[leg_class_title]</p>[/if][/if][/if][/leg_class_html]
[leg_footer_html][/leg_footer_html]
----
Timothy J Nolte - tnolte at ilpcs.com
Network Planning Engineer
iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512
Office: 616-656-5163
PCS: 616-706-2438
Fax: 616-554-6484
Web: www.ipcswirelessinc.com
More information about the MapServer-users
mailing list