Skip to content

Commit

Permalink
Fix WMS filter request with new API (ticket 7258)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Mar 1, 2013
1 parent 1a1a925 commit a777ce7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/analysis/CMakeLists.txt
Expand Up @@ -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

Expand Down
12 changes: 8 additions & 4 deletions src/mapserver/qgswmsserver.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit a777ce7

Please sign in to comment.