Hi bonar,<p><b>1.</b> I did this in Python: I create a layers variable in __init__ method:    <br></p><p>     self.layers = []  # Layer list</p><p>In addLayer method I insert the loaded layer to the list:</p>
<p>     self.layers.insert(0, QgsMapCanvasLayer(layer))</p><p>And finally set the layer list to canvas:</p><p>           self.canvas.setLayerSet(self.layers)    </p><p>Hope this helps.</p><br><div class="gmail_quote">2009/3/3 bonar <span dir="ltr">&lt;<a href="mailto:bonar_reddevil@yahoo.com" target="_blank">bonar_reddevil@yahoo.com</a>&gt;</span><div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi guys,<br>
<br>
I&#39;m new to QGis and really hope to learn something from you guys. I had a<br>
questions about Mr.Tim Sutton&#39;s Tutorial on QGis. Based on Tutorial 3:<br>
Labelling map canvas features,<br>
1. can you guys guide me about how i can load multiple layer because from<br>
that tutorial its just contain 1 layer only. I already tried to play around<br>
with the code but it still load 1 layer only.<br>
2. what is layerBasedName do because i try to put a different layer in<br>
folder data and specify a different layer name on the code but it still can<br>
display the layer inside the folder.<br>
<br>
<br>
Really aprreciate your help in this matter.<br>
<br>
Thanks in advance,<br>
bonar<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/Adding-multiple-layer-tp2414005p2414005.html" target="_blank">http://n2.nabble.com/Adding-multiple-layer-tp2414005p2414005.html</a><br>
Sent from the qgis-developer mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">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>
</font></blockquote></div></div></div><font color="#888888"><br></font>-- <br>-----------<br>   |\__  <br>(:&gt;__)(<br>   |/    <br><br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/">http://geotux.tuxfamily.org/</a><br>
<br>