[Qgis-developer] Coloring shapes of vector layer
goocreations at gmail.com
Mon Apr 11 06:58:13 EDT 2011
I've got a vector file (shp) with a bunch of points in it. I want to load
the points to the canvas with a specific color (not the random color QGIS
provides). I've tried a couple of tutorials, but the code provided doesn't
change the color.
*mask = QgsVectorLayer(maskPath, "my_mask", "ogr")*
*sy = QgsSymbol( mask.geometryType() )*
*renderer = QgsSingleSymbolRenderer( mask.geometryType() )*
*renderer.addSymbol( sy )*
*mask.setRenderer( renderer )*
Did I forget anything, or should I do something diffrently?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer