[Qgis-developer] Is QGIS supports dynamic display?
Martin Dobias
wonder.sk at gmail.com
Tue Aug 19 08:44:54 PDT 2014
Hi Bob
On Tue, Aug 19, 2014 at 7:07 PM, Tendfly Niu <niubob at hotmail.com> wrote:
> Hi Martin,
> I'm sorry to ask you again.
> I looked up QgsRubberBand class, it has 5 Geometry types: Point, Line,
> Polygon, UnknownGeometry, NoGeometry. It seems there's no way to add a svg
> symbol as a car icon on the map, or I was on a wrong way?
> Here is some questions:
> 1, How to add a svg symbol as a instance's icon? I tried
> QgssvgmarkerSymbolLayerV2 class, but it didn't display.
SVG markers are not supported by QgsRubberBand. You may want to
implement your own canvas item for that - try to have a look at
QgsVertexMarker class for some inspiration.
> 2, How to draw a line or polygon using QgsRubberBand? I constructed a
> QgsRubberband instance, set some attributes, however it was not display.
This section from PyQGIS cookbook should help you:
http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/canvas.html#rubber-bands-and-vertex-markers
Regards
Martin
More information about the Qgis-developer
mailing list