Skip to content

Commit

Permalink
Bug #8166 GetFeatureInfo: clickable area too small for points
Browse files Browse the repository at this point in the history
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 a132bc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mapserver/qgswmsserver.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit a132bc9

Please sign in to comment.