Skip to content

Commit 94a1e68

Browse files
committed
[bugfix][wms] Fix GetFeatureInfo
Fixes #17498 WMS GetFeatureInfo requests not working Use the right variable instead of an unitialized one ( followup b119744 )
1 parent 087087f commit 94a1e68

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/providers/wms/qgswmsprovider.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -2454,6 +2454,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPointXY &point, QgsRa
24542454
double xRes = myExtent.width() / width;
24552455
double yRes = myExtent.height() / height;
24562456

2457+
24572458
// Mapserver (6.0.3, for example) does not seem to work with 1x1 pixel box
24582459
// (seems to be a different issue, not the slownes of GDAL with ECW mentioned above)
24592460
// so we have to enlarge it a bit
@@ -2474,8 +2475,8 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPointXY &point, QgsRa
24742475
QgsDebugMsg( QString( "xRes = %1 yRes = %2" ).arg( xRes ).arg( yRes ) );
24752476

24762477
QgsPointXY finalPoint;
2477-
finalPoint.setX( std::floor( ( finalPoint.x() - myExtent.xMinimum() ) / xRes ) );
2478-
finalPoint.setY( std::floor( ( myExtent.yMaximum() - finalPoint.y() ) / yRes ) );
2478+
finalPoint.setX( std::floor( ( point.x() - myExtent.xMinimum() ) / xRes ) );
2479+
finalPoint.setY( std::floor( ( myExtent.yMaximum() - point.y() ) / yRes ) );
24792480

24802481
QgsDebugMsg( QString( "point = %1 %2" ).arg( finalPoint.x() ).arg( finalPoint.y() ) );
24812482

0 commit comments

Comments
 (0)