Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2712 closed enhancement (fixed)

API enhancement: zoomScale(double scale) on mapCanvas

Reported by: anitagraser Owned by: ctimko
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: MapCanvas Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

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

Attachments (2)

patch.txt (1.0 KB ) - added by ctimko 14 years ago.
Patch generated by SVN in Eclipse
bug2712fix.diff (1.5 KB ) - added by ctimko 14 years ago.
patchfix

Download all attachments as: .zip

Change History (6)

comment:1 by ctimko, 14 years ago

Owner: changed from nobody to ctimko
Status: newassigned

by ctimko, 14 years ago

Attachment: patch.txt added

Patch generated by SVN in Eclipse

comment:2 by ctimko, 14 years ago

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

by ctimko, 14 years ago

Attachment: bug2712fix.diff added

patchfix

comment:3 by ctimko, 14 years ago

Resolution: fixed
Status: assignedclosed

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))

comment:4 by jef, 14 years ago

applied in r13517. Thanks.

Note: See TracTickets for help on using tickets.