8

Before QgsMapRenderer was deprecated if we wanted to activate OTF we used code like this:

canvas = QgsMapCanvas()
canvas.mapRenderer().setProjectionsEnabled(True)

Currently, QgsMapRenderer is divided into two classes QgsMapSettings and QgsMapRendererJob. I did some research, but with no success. So how we can achieve the same now?

1

1 Answer 1

5

Not sure if this will be possible as according to one of the QGIS devs @ndawson in response to Feature request #11644:

"Disabling on the fly projection is no longer an option in QGIS 3.0"

4
  • So, you are saying that even this class is deprecated I can use it anyway?
    – DIV
    May 19, 2017 at 11:20
  • @DIVAD - Edited my post :)
    – Joseph
    May 19, 2017 at 11:47
  • 2
    Thanks. That's what I was looking for, despite that it's not a good information (at least for me :) ).
    – DIV
    May 19, 2017 at 12:00
  • @DIVAD - Most welcome, hopefully it won't affect you too much ;)
    – Joseph
    May 19, 2017 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.