Set Transparency of KMZ rgb

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1120
Joined: Mon Jan 19, 2009 7:16 pm

Set Transparency of KMZ rgb

Post by joleenf »

Hi,

Is there a way to set the transparency of a KMZ layer that is displayed via a script? I tried accessing the layer and then using

layer.setAlpha(0.4), however it does not update the display.

Thanks,
Joleen
User avatar
bobc
Posts: 939
Joined: Mon Nov 15, 2010 5:57 pm

Re: Set Transparency of KMZ rgb

Post by bobc »

Hi Joleen -

Looking at the code, it looks like the transparency is being applied with setAlphaFromSlider(). So, you can run:

Code: Select all

layer.setAlphaFromSlider(0.4)

... which sets the layer as 40% transparent. Note that while the display itself updates, the slider in the Layer Controls doesn't update.

Let me know if this doesn't work, or if you have any questions.

Thanks -
Bob Carp
User avatar
joleenf
Posts: 1120
Joined: Mon Jan 19, 2009 7:16 pm

Re: Set Transparency of KMZ rgb

Post by joleenf »

Thanks, that worked.

Joleen
Post Reply