I want to get the scale of my Layout that I created. For this I thought of using the QgsLayoutItemMap
class. The problem is that the scale method in QgsLayoutItemMap
always returns 0.0
. I know I am doing something wrong but I don't know what. Here is the code I am using:
projectInstance = QgsProject.instance()
projectLayoutManager = projectInstance.layoutManager()
item = projectLayoutManager.layoutByName("asd")
tail = QgsLayoutItemMap(item)
tail.scale()