Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use the correct method of determining vector tile zoom level
for identify tool

Fixes incorrect zoom levels used by tool when identify esri
vector tile sources
  • Loading branch information
nyalldawson committed May 22, 2023
1 parent 7ad16b7 commit f2edb04
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/gui/qgsmaptoolidentify.cpp
Expand Up @@ -443,7 +443,14 @@ bool QgsMapToolIdentify::identifyVectorTileLayer( QList<QgsMapToolIdentify::Iden
}
}

const int tileZoom = layer->tileMatrixSet().scaleToZoomLevel( mCanvas->scale() );
const double tileScale = layer->tileMatrixSet().calculateTileScaleForMap(
mCanvas->scale(),
mCanvas->mapSettings().destinationCrs(),
mCanvas->mapSettings().extent(),
mCanvas->size(),
mCanvas->logicalDpiX() );

const int tileZoom = layer->tileMatrixSet().scaleToZoomLevel( tileScale );
const QgsTileMatrix tileMatrix = layer->tileMatrixSet().tileMatrix( tileZoom );
const QgsTileRange tileRange = tileMatrix.tileRangeFromExtent( r );

Expand Down

0 comments on commit f2edb04

Please sign in to comment.