[Qgis-developer] Fwd: Adding multiple layer

bonar bonar_reddevil at yahoo.com
Tue Mar 3 23:50:23 EST 2009




Germán Carrillo wrote:
> 
> Hi bonar,
> 
> *1.* I did this in Python: I create a layers variable in __init__ method:
> 
> 
>      self.layers = []  # Layer list
> 
> In addLayer method I insert the loaded layer to the list:
> 
>      self.layers.insert(0, QgsMapCanvasLayer(layer))
> 
> And finally set the layer list to canvas:
> 
>      self.canvas.setLayerSet(self.layers)
> 
> Hope this helps.
> 
> 2009/3/3 bonar <bonar_reddevil at yahoo.com>
> 
>>
>> Hi guys,
>>
>> I'm new to QGis and really hope to learn something from you guys. I had a
>> questions about Mr.Tim Sutton's Tutorial on QGis. Based on Tutorial 3:
>> Labelling map canvas features,
>> 1. can you guys guide me about how i can load multiple layer because from
>> that tutorial its just contain 1 layer only. I already tried to play
>> around
>> with the code but it still load 1 layer only.
>> 2. what is layerBasedName do because i try to put a different layer in
>> folder data and specify a different layer name on the code but it still
>> can
>> display the layer inside the folder.
>>
>>
>> Really aprreciate your help in this matter.
>>
>> Thanks in advance,
>> bonar
>> --
>> View this message in context:
>> http://n2.nabble.com/Adding-multiple-layer-tp2414005p2414005.html
>> Sent from the qgis-developer mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> 
> -- 
> -----------
>   |\__
> (:>__)(
>   |/
> 
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 


Hi Germán Carrillo,

Thank for your reply and its helps me a lot!! Actually i'm using Qgis with
C++ but i still can implement your logic there. Thanks again and god bless
you.

regards,
bonar

-- 
View this message in context: http://n2.nabble.com/Adding-multiple-layer-tp2414005p2420407.html
Sent from the qgis-developer mailing list archive at Nabble.com.



More information about the Qgis-developer mailing list