[Chameleon] current, actual legend
Paul Spencer
pspencer at dmsolutions.ca
Tue Nov 9 20:08:09 EST 2004
Markus,
you are correct, layer_visible is only available in mapscript 4.3/4.4
if I understand the problem correctly, you are saying that when you use
opt_flags=0 then layers get turned off?
If this is the case, with beta 3 you can add the following attribute to
the LegendTemplate widget tag:
CONTROLVISIBILITY="false"
Theoretically, in an earlier version, it should have worked if you had a
legend template that did not include checkboxes - so your template
should have worked - but for some reason I could never figure out the
logic to do this correctly without checkboxes. So the fix was to
introduce CONTROLVISIBILITY :)
Cheers,
Paul
Schnider Markus wrote:
> 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
>
>
--
Cheers,
Paul
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the Chameleon
mailing list