No description provided.
@szekerest please be more precise. Multiple labels are clearly not supported with annotation layers, and therefore label expressions neither. Annotation layers wil be going away very soon and are marked as deprecated, there's no reason to have expressions inside a label for annotation layers.
@tbonfort In case of MS_LAYER_ANNOTATION label->status may set to MS_OFF by the rendering code. Therefore the legend image "Az" is not drawn. The status should always set to MS_ON when drawing the legend icons.
We should think it over how we deprecate annotation layers without loosing many of the features behind.
Which features are left behind? To my knowledge, there are none.
For example rendering text legend icons for layers which contain annotations only.
please post the layer definition when your annotation layer does not show up in the legend.
"coordsys_name" "AGD66 / AMG zone 50"
END # METADATA
END # PROJECTION
NAME "Class (0)"
EXPRESSION ('[Suburb]' = 'Munster')
COLOR 255 0 0
OFFSET 0 0
SHADOWSIZE 1 1
END # LABEL
COLOR 255 255 255
OUTLINECOLOR 0 0 0
END # STYLE
END # CLASS
END # LAYER
Well, as I said, expressions inside an annotation layer are not supported. The ticket could be changed to " render 'Az' string in legend icon" when layer contains no styles or label styles.
The title you mention would apply for another ticket as it would provide a new feature. I just wanted to fix a problem which have been working before the label->status thing was introduced.
We may probably rename the issue as "Legend icons for annotation layers are not always drawn". This also applies to mapscript when calling drawLegendIcon for the layer having label expressions.
label->status is not used in maplegend.c, so the problem is probably elsewhere
Fix rendering annotation layers with expressions in legend (#4641)
Fix committed. I think the problem is less than we made such amount of efforts for it.
So instead of adding the same functionality to point layers that have no markers defined , you/we now have a reason to fight against the deprecation of annotation layers, that I have the pleasure to keep maintaining ...
Adding the new option you mentioned would require more consideration and testing. Now I just wanted to fix an issue a client has reported. Later I'll probably find some more time to provide a more sophisticated solution.
fixed for annotation layers in 6.4 by tamas, and implemented for point layers with no symbols in the rfc98 branch for 7.0 (#4673) . c.f. tbonfort/msautotest@0594325 tbonfort/msautotest@918e6b6