Hi Luca, <br><br><div class="gmail_quote">On Fri, Apr 1, 2011 at 9:14 AM,  <span dir="ltr">&lt;<a href="mailto:luca_manganelli@comune.trento.it">luca_manganelli@comune.trento.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


I&#39;ve searched across documentation and mailing list, but I didn&#39;t found a<br>
page explaining how to set a symbol.<br></blockquote><div>create your style within QGis and save it as e.g. &quot;point.qml&quot; in your plugin folder, <br>then load it using this snapshot:<br><br><span style="font-family: courier new,monospace;">import os.path</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">style_path = os.path.join( os.path.dirname(__file__), &quot;point.qml&quot; )</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">(errorMsg, result) = vectorLayer.loadNamedStyle( style_path )</span><br>

<br>So to change the style of the layer it consists just in a file replacing without any change <br>in your code.<br><br>Cheers.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


<br>
For example:<br>
<br>
  - point layer: I want to use a circle with width 0.5 and gray colour with<br>
black border;<br>
  - line layer: width 1 and continous green line<br>
<br>
any hint?<br>
<br>
Thank you in advance.<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br><br>