Bug report #1588
invoking ZoomToSelected() on a single point feature puts map at scale 2:1
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11648|
I wrote a python plugin and I use ZoomToSelected() to zoom to a point feature.
The problem is that QGIS zooms too near, at 2:1 scale.
If you have a raster image behind that point, it is VERY slow to render at that strange scale.
It would be nice to have a parameter, like minimum zoom level...
#2 Updated by luca76 - over 11 years ago
Replying to [comment:1 pcav]:
It is not clear which the minimum zoom level would be, but I agree that 2:1 is zooming really too close: can this be changed to, say, 100:1?
ehm... 1:100, not 100:1 (that would be TOO near :-P) !
Anyway, you should give the opportunity to programmer to set its preferred minimum scale factor.
#4 Updated by luca76 - over 11 years ago
Replying to [comment:3 gsherman]:
You could modify your code to expand the view extent to a reasonable level prior to the zoom, using the coordinates of the selected point.
Yes, but if I'm right, there's no way to zoom ad a fixed scale in QGIS. Correct me if I am wrong.