Skip to content
Permalink
Browse files
Fix WMS filter request with new API (ticket 7258)
  • Loading branch information
mhugent committed Mar 1, 2013
1 parent 1a1a925 commit a777ce751500fad748e9204149b794b04dab218f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
@@ -149,7 +149,7 @@ IF (NOT ANDROID)
ENDIF (NOT ANDROID)

ADD_DEPENDENCIES(qgis_analysis qgis_core)
TARGET_LINK_LIBRARIES(qgis_analysis qgis_core)
TARGET_LINK_LIBRARIES(qgis_analysis qgis_core ${SQLITE3_LIBRARY} )

# install

@@ -1265,10 +1265,14 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
bool addWktGeometry = mConfigParser && mConfigParser->featureInfoWithWktGeometry();
const QSet<QString>& excludedAttributes = layer->excludeAttributesWMS();

QgsFeatureIterator fit = layer->getFeatures( QgsFeatureRequest()
.setFilterRect( searchRect )
.setFlags((( addWktGeometry || featureBBox ) ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ) | QgsFeatureRequest::ExactIntersect )
);
QgsFeatureRequest fReq;
fReq.setFlags((( addWktGeometry || featureBBox ) ? QgsFeatureRequest::NoFlags : QgsFeatureRequest::NoGeometry ) | QgsFeatureRequest::ExactIntersect );
if ( !searchRect.isEmpty() )
{
fReq.setFilterRect( searchRect );
}
QgsFeatureIterator fit = layer->getFeatures( fReq );

while ( fit.nextFeature( feature ) )
{
++featureCounter;

0 comments on commit a777ce7

Please sign in to comment.