Feature request #2712

API enhancement: zoomScale(double scale) on mapCanvas

Added by Anita Graser over 14 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Charles Timko -
Category:Map Canvas
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12772

Description

It would be nice to have a function that accepts a scale value and actually affects the scale of the map, so it can be used from inside a python plugin.

iface.mapCanvas().mapRenderer().setScale(double scale) only affects the value in the scale box in the bottom right corner of QGIS window.

Related forum thread: http://forum.qgis.org/viewtopic.php?f=5&t=6572

patch.txt Magnifier - Patch generated by SVN in Eclipse (1.04 KB) Charles Timko -, 2010-05-13 12:45 PM

bug2712fix.diff Magnifier - patchfix (1.45 KB) Charles Timko -, 2010-05-14 02:46 PM

History

#1 Updated by Charles Timko - over 14 years ago

  • Status changed from Open to In Progress

#2 Updated by Charles Timko - over 14 years ago

I am leaving the closing of this ticket to someone of higher rank :-D

#3 Updated by Charles Timko - over 14 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

Ignore patch.txt, because after I was able to fully test it I realized I left something out so it wasn't exposed yet. bug2717fix.diff has been tested and zoomScale is exposed and does work within Python. ((And since i know this patch works I am resolving this bug))

#4 Updated by Jürgen Fischer over 14 years ago

applied in e88a80af (SVN r13518). Thanks.

Also available in: Atom PDF