Graphics Reference
In-Depth Information
Your new QgsMapCanvasItem will automatically be added to the map canvas when
the object is initialized—you don't need to explicitly add it to the canvas. To remove the
compass rose from the map canvas, you can do the following:
iface.mapCanvas().scene().removeItem(rose)
Note that map canvas items float above the map layers, and unfortunately, cannot directly
interact with the user—you can't intercept and respond to mouse events using a map can-
vas item.
Search WWH ::




Custom Search