Skip to content
Permalink
Browse files

Bug #8166 GetFeatureInfo: clickable area too small for points

For point layers, clicking exactly on the point is difficult, and the user misses the popup very often.
Better define a larger clickable area.
This commit enlarge the area for point by 2.
  • Loading branch information
rldhont committed Jul 16, 2013
1 parent 7dbef92 commit a132bc9a9e318c2321c8fba13dc9503b4d11e2aa
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/mapserver/qgswmsserver.cpp
@@ -1287,10 +1287,14 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
{
searchRadius = layerRect.width() / 400;
}
else
else if ( layer->geometryType() == QGis::Line )
{
searchRadius = layerRect.width() / 200;
}
else
{
searchRadius = layerRect.width() / 100;
}

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

0 comments on commit a132bc9

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