How can i add a north arrow in QgsComposition?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to add an svg image of north arrow in QgsComposition using this code:

mapRenderer = iface.mapCanvas().mapRenderer() theComposition = QgsComposition(mapRenderer) theComposition.setPlotStyle(QgsComposition.Print) northarrowIcon = QgsComposerPicture(theComposition) northarrowIcon.setPos(QPointF(50,110)) northarrowIcon.setPictureFile("./svg/north_arrows/north-arrow_3_simple_symmetric_triangular.svg") theComposition.addItem(northarrowIcon) i don't have an execution problem but the arrow is not shown.

Can someone check and give me an idea what can be the cause of that.



أكثر...
 
أعلى