[Qgis-developer] mapserver plugin, qgs project xml and label-elements

Richard Duivenvoorde rdmailings at duif.net
Wed Mar 24 17:59:11 EDT 2010

Hi Devs,

trying to fix the label part of the mapserver plugin I find different 
'label'-elements in a 'maplayer'-element in the qgs project xml.

-1- There is the one holding a 1 or 0 to indicate if this layer has labels.
-2- There is one in every symbol element (for the 'labels' in the 
legend, at least for a uniquevalue classification)
-3- There is one in the labelattributes-element, having the 
fieldname-attribute and text-attribute indicating the label-text

as the plugin is using xml-minidom/getElementsByTagName it would be 
easier to make those elements more distinguishable (is that english :-) 
), for example by making the first one 'labels' or 'haslabels', the 
second one 'legendlabel' and the last one ... 'labeltext' or so?

somebody problems with that, or a better/easier way to find out using 
the parsed qgs-file if a layer has labels or not? Or should we stop 
using the projectfile as leading for the plugin anyway, and use the 
loaded project to determine this kind of information by just 'asking' 
the layerobjects etc?


Richard Duivenvoorde

More information about the Qgis-developer mailing list