Skip to content
Permalink
Browse files

Mapserver: fixed bounding box of points features collection returned …

…in GetFeatureInfo request
  • Loading branch information
Marcel Dancak
Marcel Dancak committed Aug 21, 2014
1 parent 599255c commit 8c7b39463987e41438d174e4f3e8694fc45516ca
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 8c7b394

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