[Qgis-user] Switch on only 1 layer of a group

Salvatore Larosa lrssvtml at gmail.com
Fri Nov 14 00:42:20 PST 2014


Hi,

On Fri, Nov 14, 2014 at 9:10 AM, aperi2007 <aperi2007 at gmail.com> wrote:
> Hi Salvatore,
>
> thx for hint.
> It is a very interesting feature.
> I dont know it.
>
> But unfortunately it dont seem to be what I need.

ok, my immagination was wrong :)

>
> My need is showing the the user all the layer of a group.
>
> they are all wms layer of kind OFC ortophoto, and each of them cover all the
> land.
> So If perfectly unuseful for the user turn on more than one layer at same
> time.
> So the need is avoid that the user turn off more than one of them.
>
> This is a standard feature in some webgis framework.
> And it will be useful aso in a qgis project to avoid that the user could
> turn on some layers that are not
> useful to see both at the same time.
> And if turn on more than one at the same time it see only the upper (the
> other are covered) but the
> time to show the map and the network traffic is for all of them.

So you want to alternate layers that cover each other?
That is a cool feature, but it is not possible to do right now.

>
> AFAIK this feature dont seem to be available so I'm evaluating if is
> possible to support it with a few of python code in an action.

No idea on how to do such an action from python but I think that
should be handy to do from C++ to have it available in group context
menu, something like a checkbox "Alternate layers". maybe could you
open a feature request?

>
> A.
>
>
> Il 14/11/2014 08:53, Salvatore Larosa ha scritto:
>
>> Hi,
>>
>> On Fri, Nov 14, 2014 at 7:33 AM, Andrea Peri <aperi2007 at gmail.com> wrote:
>>>
>>> Hi, I need to set a qgis project to turn on only 1 layer from a group.
>>> When
>>> a layer is turn on the others should be turn off.
>>> I guess this is not possibile from group properties, but is possibile to
>>> set
>>> an action to turn off every layer in a group other than the actual layer
>>> turn on   ?
>>
>> I guess what you are looking for is adding a "Preset" in legend tree.
>> This is a new feature found in 2.6.
>> Turn off all layers and activate the only layer which you want display
>> then add a Preset (from eye icon).
>>
>> Best Regards,
>> -SL
>>
>>
>



-- 
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt on freenode



More information about the Qgis-user mailing list