[Chameleon] current, actual legend
Schnider Markus
msr at sourcepole.ch
Tue Nov 9 10:49:57 EST 2004
Paul,
I would a legend with the current visible layers.
But I am using mapserver 4.2 and not 4.3, so I can't use 'layer_visible' if I
understand the bug 648 of mapserver (fixed in Version 4.3).
If I use opt_flag=15, then I see all active layer, but I want only see the
active and visible layers (opt_flag=0).
Markus
PS: The legend file:
[leg_group_html]
<tr>
<td colspan=5 bgcolor=#cccccc><span
class="label">[leg_group_name]</span></b></td>
</tr>
[/leg_group_html]
[leg_layer_html order=ascending opt_flag=0]
<tr bgcolor="#ffffff">
<td><img src="[leg_icon width=20 height=18]" width="20" height="20"></td>
<td>
[if name=wms_title oper=isnull]<a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span
class="label">[leg_layer_name][/if]
[if name=wms_title oper=isset]<a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span
class="label">[metadata name=WMS_TITLE][/if]
</span></a>
</td>
</tr>
[/leg_layer_html]
[leg_class_html]
<tr>
<td></td>
<td colspan=4><img src="[leg_icon width=20 height=18]" width="20"
height="20"> <span class="label">[leg_class_name]</span></a></td>
</tr>
[/leg_class_html]
On Tuesday 09 November 2004 14:38, Paul Spencer wrote:
> Markus,
>
> you should be able to achieve what you want without modification to the
> widget. But I am not sure I understand what you need to do. Can you
> send more details about what you want the legend to do?
>
> Paul
>
> Schnider Markus wrote:
> > Hi List
> >
> > How is it possible to have a actual legend and not to change a widget?
> > I would only show the layers, there are also visible in the map.
> >
> > My current solution is not very good for an update:
> > I have changed LegendTemplate.widget.php:
> > In the function ParseUrl (line 346) I have made following changes:
> > /* if (!isset($this->maParams["EMBEDDED"]) ||
> > (isset($this->maParams["EMBEDDED"]) &&
> > strcasecmp(trim($this->maParams["EMBEDDED"]), "TRUE") ==
> > 0)) */
> > if (false)
> >
> > Now I receive always an actual legend, and the layers rest in the map.
> > I am using a template like
> > ...
> > [leg_layer_html order=ascending opt_flag=0]
> > ...
> >
> > If someone have a solution to solve this problem I will take it, else I
> > have to send a wish to the developers.
> >
> > Thanks
> >
> > Markus Schnider
> > Sourcepole AG
> > _______________________________________________
> > Chameleon mailing list
> > Chameleon at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/chameleon
More information about the Chameleon
mailing list