Skip to content

Commit

Permalink
Mapserver: fixed bounding box of points features collection returned …
Browse files Browse the repository at this point in the history
…in GetFeatureInfo request
  • Loading branch information
Marcel Dancak committed Aug 21, 2014
1 parent 599255c commit 8c7b394
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mapserver/qgswmsserver.cpp
Expand Up @@ -1731,6 +1731,7 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
} }
QgsFeatureIterator fit = layer->getFeatures( fReq ); QgsFeatureIterator fit = layer->getFeatures( fReq );


bool featureBBoxInitialized = false;
while ( fit.nextFeature( feature ) ) while ( fit.nextFeature( feature ) )
{ {
++featureCounter; ++featureCounter;
Expand Down Expand Up @@ -1760,9 +1761,10 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
box = mapRender->layerExtentToOutputExtent( layer, feature.geometry()->boundingBox() ); box = mapRender->layerExtentToOutputExtent( layer, feature.geometry()->boundingBox() );
if ( featureBBox ) //extend feature info bounding box if requested if ( featureBBox ) //extend feature info bounding box if requested
{ {
if ( featureBBox->isEmpty() ) if ( !featureBBoxInitialized && featureBBox->isEmpty())
{ {
*featureBBox = box; *featureBBox = box;
featureBBoxInitialized = true;
} }
else else
{ {
Expand Down

0 comments on commit 8c7b394

Please sign in to comment.