mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
No data is only for HTML and TEXT format
This commit is contained in:
parent
053ae1edb5
commit
b63dc39d27
@ -1775,7 +1775,7 @@ namespace QgsWms
|
||||
QDomElement attributeElement = infoDocument.createElement( QStringLiteral( "Attribute" ) );
|
||||
attributeElement.setAttribute( QStringLiteral( "name" ), layer->bandName( it.key() ) );
|
||||
|
||||
QString value( QStringLiteral( "no data" ) );
|
||||
QString value;
|
||||
if ( ! it.value().isNull() )
|
||||
{
|
||||
value = QString::number( it.value().toDouble() );
|
||||
@ -2126,8 +2126,13 @@ namespace QgsWms
|
||||
for ( int j = 0; j < attributeNodeList.size(); ++j )
|
||||
{
|
||||
QDomElement attributeElement = attributeNodeList.at( j ).toElement();
|
||||
QString value = attributeElement.attribute( QStringLiteral( "value" ) );
|
||||
if ( value.isEmpty() )
|
||||
{
|
||||
value = QStringLiteral( "no data" );
|
||||
}
|
||||
featureInfoString.append( "<TR><TH>" + attributeElement.attribute( QStringLiteral( "name" ) ) +
|
||||
"</TH><TD>" + attributeElement.attribute( QStringLiteral( "value" ) ) + "</TD></TR>\n" );
|
||||
"</TH><TD>" + value + "</TD></TR>\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -2184,8 +2189,13 @@ namespace QgsWms
|
||||
for ( int j = 0; j < attributeNodeList.size(); ++j )
|
||||
{
|
||||
QDomElement attributeElement = attributeNodeList.at( j ).toElement();
|
||||
QString value = attributeElement.attribute( QStringLiteral( "value" ) );
|
||||
if ( value.isEmpty() )
|
||||
{
|
||||
value = QStringLiteral( "no data" );
|
||||
}
|
||||
featureInfoString.append( attributeElement.attribute( QStringLiteral( "name" ) ) + " = '" +
|
||||
attributeElement.attribute( QStringLiteral( "value" ) ) + "'\n" );
|
||||
value + "'\n" );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user