Questions tagged [qgsrubberband]

A class for drawing transient features on the map in QGIS.

Filter by
Sorted by
Tagged with
2
votes
1answer
84 views

Styling rubberbands using PyQGIS?

I would like to add an on-map drawing function in my stand alone app, so I used QgsRubberBand to make it. I made a tool that emits points and then draw the QgsRubberBand. The problem is I don't find ...
1
vote
0answers
58 views

Saving MapCanvas with RubberBand items as image

I want to save map canvas as image (Project > Save as Image..) together with rubber band items(colored areas in the image). But QGIS 2.18 just saves features of shown layers on map canvas. I get the ...
3
votes
0answers
199 views

How to label a rubber band (QgsRubberBand)

It is possible to label QgsRubberBand or QgsVertexMarker with a text annotation (QgsTextAnnotationItem). See this MWE: ... r_polyline = QgsRubberBand(iface.mapCanvas(), False) r_polyline....
2
votes
1answer
224 views

Removing RubberBand item in QGIS 2.18.19?

I have QGIS 2.18.18 and 2.18.19 in seperate computers. I use the following script to remove RubberBand items. It works in 2.18.18 but doesn't work in 2.18.19 import qgis # Get RubberBands rbs = [ i ...
1
vote
1answer
69 views

QgsRubberBand constructor deprecation warning

I construct a QgsRubberBand in PyQGIS 2.18.17 the following way canvas = iface.mapCanvas() my_rubber = QgsRubberBand(canvas, QGis.WKBPolygon) according to https://qgis.org/api/2.18/...
3
votes
0answers
217 views

QgsRubberBand Move Event

So, basically I've created a QgsRubberBand which copies feature from layer. And I need to be able visually move this rubberband on mouse event 'move'. Actually same visualisation like during self....
1
vote
0answers
193 views

Passing a WKT Polygon with interior rings to a QgsRubberBand's Geometry with PyQGIS

Starting point is that I select a geometry with the following query in QGIS DB Manager: SELECT 1 AS myid, st_buffer(st_union(wkb_geometry), 5) FROM ax_strassenverkehr WHERE unverschluesselt ILIKE '%...