Skip to content
Permalink
Browse files

Smaller treshold for GetFeatureInfo for polygons

  • Loading branch information
mhugent committed May 25, 2012
1 parent 45474ac commit afcd5b6e3c1f727bce967c4fd1d039665d76127c
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/mapserver/qgswmsserver.cpp
@@ -1262,7 +1262,16 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
//info point could be 0 in case there is only an attribute filter
if ( infoPoint )
{
double searchRadius = ( layerRect.xMaximum() - layerRect.xMinimum() ) / 100;
double searchRadius = 0;
if ( layer->geometryType() == QGis::Polygon )
{
searchRadius = layerRect.width() / 400;
}
else
{
searchRadius = layerRect.width() / 200;
}

searchRect.set( infoPoint->x() - searchRadius, infoPoint->y() - searchRadius,
infoPoint->x() + searchRadius, infoPoint->y() + searchRadius );
}

0 comments on commit afcd5b6

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