Hi Bob

On Tue, Aug 19, 2014 at 7:07 PM, Tendfly Niu <[email protected]> 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
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to