Skip to content
Permalink
Browse files

Merge pull request #1547 from marcel-dancak/bbox-bugfix

Mapserver: fixed bounding box of points features collection returned in GetFeatureInfo request
  • Loading branch information
mhugent committed Aug 29, 2014
2 parents f92fd58 + 8c7b394 commit dcc7948934ed296fbba1ebefee45b6e1d7285ca8
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/mapserver/qgswmsserver.cpp
@@ -1731,6 +1731,7 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
}
QgsFeatureIterator fit = layer->getFeatures( fReq );

bool featureBBoxInitialized = false;
while ( fit.nextFeature( feature ) )
{
++featureCounter;
@@ -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
{

0 comments on commit dcc7948

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