i try to export a map but at the end of my process I always get the following message: "name 'iface' is not defined".
What is wrong with my script?
I am working with QGIS 2.18.12
from PyQt4.QtGui import QColor, QImage, QPainter
from qgis.core import QgsExpression, QgsStatisticalSummary, QgsSymbolV2, QgsDataDefined, QgsRuleBasedRendererV2, QgsMarkerSymbolV2
from PyQt4.QtCore import Qsize
...
map_settings = iface.mapCanvas().mapSettings()
c = QgsComposition(map_settings)
c.setPaperSize(400,160)
c.setPrintResolution(dpi)
...
No comments:
Post a Comment