Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to change the style of the polygon contained in the vector layer. Is there any API available?

(I can click the properties of the shapefile, then select the style and change the symbol properties, but I want to do this programmatically.)

I am using Python to customise QGIS.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The documentation can be found here: http://www.qgis.org/pyqgis-cookbook/vector.html#appearance-symbology-of-vector-layers

I haven't tried it yet, so I cannot provide any further pointers but the code examples there look good to go.

share|improve this answer
    
when we try to access class 'QgsMarkerSymbolLayerV2' from the python console inside the QGIS , It showed me that 'class doesn't exist' I am using QGIS 1.7 –  Vicky Nov 5 '11 at 10:26
    
Works for me (running 1.7.1): >>> QgsMarkerSymbolLayerV2 <class 'qgis.core.QgsMarkerSymbolLayerV2'> –  underdark Nov 5 '11 at 11:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.