Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change opacity #6

Closed
ebrehault opened this issue Dec 6, 2013 · 9 comments
Closed

Change opacity #6

ebrehault opened this issue Dec 6, 2013 · 9 comments
Assignees

Comments

@ebrehault
Copy link

When we display a WMS layer on top of another one, by default the opacity is 1, so the user only see the top layer. Is it possible to change this opacity so users can see the base layer in transparency ?

@DiegoGomezDeck
Copy link
Member

G3M doesn't support mixing of layers with transparency, I recommend to merge the layers on the server side.

@mdelacalle
Copy link
Member

Currently we don't support that capability because of performance. Probably in the next future we are going to add that, if you need urgently that please contact with us we can give you the workaround or our change our roadmap if was needed.

@DiegoGomezDeck
Copy link
Member

If the WMS server support generation of PNGs with alpha channel (with a parameter such opacity or transparency) you can send this parameter using the method WMSLayer.setExtraParameter(string). The current version does support to mix layers respecting the alpha channel present in the PNGs.

@mdelacalle mdelacalle reopened this Dec 17, 2013
@ghost ghost assigned amazingsmash Dec 17, 2013
@DiegoGomezDeck
Copy link
Member

Add, to Layer class, float _transparency instance variable, and use it as an alpha factor when merging layers.

@NidhalSNSdev
Copy link

Can you give us more details to implement this solution

@mdelacalle
Copy link
Member

Work in progress. I hope in a few time we will have this capability available

@amazingsmash
Copy link
Contributor

Now Layers have an extra parameter (optional) that sets their transparency [0..1] when merging with other layers. G3MiOSDemo has an example where Spain is shown as a mix of BlueMarble layer and PNOA layer with a transparency of 0.5.

@mdelacalle
Copy link
Member

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants