[Qgis-developer] QgsRubberband does not draw polygons(python)

vinayan vinayan123 at gmail.com
Mon Apr 8 06:52:46 PDT 2013


thanks to Salvatore's help on irc, i got over this issue.

apparently the 'isPolygon' method was deprected..

here is the snippet that worked..

mCanvas = iface.mapCanvas()
rb = QgsRubberBand(mCanvas,QGis.Polygon)
rb.addPoint(QgsPoint(300,300))
rb.addPoint(QgsPoint(400,400))
rb.addPoint(QgsPoint(400,600))
print rb.asGeometry().exportToWkt()
POLYGON((300.0 300.0,400.0 400.0,400.0 600.0,300.0 300.0))




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/QgsRubberband-does-not-draw-polygons-python-tp5045238p5045248.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list