void QgsCategorizedSymbolRendererV2::toSld( QDomDocument &doc, QDomElement &element ) const { QgsStringMap props; props[ "attribute" ] = mAttrName; if ( mRotation.data() ) props[ "angle" ] = mRotation->expression(); if ( mSizeScale.data() ) props[ "scale" ] = mSizeScale->expression(); // create a Rule for each range for ( QgsCategoryList::const_iterator it = mCategories.constBegin(); it != mCategories.constEnd(); ++it ) { QgsStringMap catProps( props ); it->toSld( doc, element, catProps ); } }
void QgsCategorizedSymbolRendererV2::toSld( QDomDocument &doc, QDomElement &element ) const { QgsStringMap props; props[ "attribute" ] = mAttrName; if ( !mRotationField.isEmpty() ) props[ "angle" ] = QString( mRotationField ).append( "\"" ).prepend( "\"" ); if ( !mSizeScaleField.isEmpty() ) props[ "scale" ] = QString( mSizeScaleField ).append( "\"" ).prepend( "\"" ); // create a Rule for each range for ( QgsCategoryList::const_iterator it = mCategories.constBegin(); it != mCategories.constEnd(); it++ ) { QgsStringMap catProps( props ); it->toSld( doc, element, catProps ); } }