Skip to content
Permalink
Browse files

[BUGFIX][Server] GetFeature: selecting attribute by clean propertyname

  • Loading branch information
rldhont committed Mar 16, 2018
1 parent 6aedf02 commit 3f31100af05eec3c4aa3fe53ac6f400606b7b6a6
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/server/qgswfsserver.cpp
@@ -941,11 +941,17 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
QStringList::const_iterator alstIt;
QList<int> idxList;
QgsFields fields = layer->pendingFields();
// build corresponding propertyname
QList<QString> propertynames;
for ( int idx = 0; idx < fields.count(); ++idx )
{
propertynames.append( fields[idx].name().replace( " ", "_" ) );
}
QString fieldName;
for ( alstIt = attrList.begin(); alstIt != attrList.end(); ++alstIt )
{
fieldName = *alstIt;
int fieldNameIdx = fields.fieldNameIndex( fieldName );
int fieldNameIdx = propertynames.indexOf( fieldName );
if ( fieldNameIdx > -1 )
{
idxList.append( fieldNameIdx );

0 comments on commit 3f31100

Please sign in to comment.
You can’t perform that action at this time.