3

Question regarding QgsMapCanvas using python for QGIS :

what is the difference between the following two methods?

myQgsMapCanvas.rotate(10.0) myQgsMapCanvas.setRotation(10.0)

(myQgsMapCanvas is of type QgsMapCanvas)

My understanding after trial and error: When using myQgsMapCanvas.rotate(10.0), the map is rotated relative 10.0 deg and the rotation widget at the the QGIS status bar does not change

When using myQgsMapCanvas.setRotation(10.0) the map is rotated to absolute 10.0 deg and the rotation widget at the the QGIS status bar changes to 10.0 deg

Is this correctly understood ?

I use QGIS 3.2.1-Bonn and QT 5.9.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.