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 );

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

0 comments on commit 8c7b394

Please sign in to comment.