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

Transparent polygon #6

Open
flopp999 opened this issue Apr 9, 2018 · 7 comments
Open

Transparent polygon #6

flopp999 opened this issue Apr 9, 2018 · 7 comments

Comments

@flopp999
Copy link

flopp999 commented Apr 9, 2018

I would be nice to have the possibility to change the opacity of the polygon with a scale from 0-100% then you would see city names etc through the areas

@samhatchett
Copy link
Member

nice! not quite a duplicate of #3 - since this seems to refer to a static polygon property.

any interest in opening a PR?

@flopp999
Copy link
Author

flopp999 commented Apr 12, 2018

Im sorry but I have no knowledge how this works.
I tried to change opacity value but it didn't change anything, so have no clue how it works, sorry
I change this line without any change in the plugin

pp['line-opacity'] = 0;

@samhatchett
Copy link
Member

it's a little scary in there!

as the frames are animating, an old frame will be set to fully transparent, and the new frame will be set to fully opaque here:

this.map.setPaintProperty(newFrame, selector, 1);

... so we'll need some logic related to restoring the user-setting opacity rather than assuming fully opaque. This is a great idea in combination with #3 - so I plan to spend some effort on this in the coming weeks. I'm thinking there's a more elegant approach to this than the barebones frame-out/frame-in opacity setting logic.

@samhatchett
Copy link
Member

btw, @flopp999 - I wonder if you could share a few words about how you are using this plugin, and your specific case for the polygon opacity. I know it seems pretty intuitive, but I'd like to learn a bit about how this is being used in the wild. My original use case was pretty narrow.

@flopp999
Copy link
Author

We have meteorological measurement stations in different locations and we want to view their data in a nice way and we think this plugin can be very nice :)
if the polygon was a little bit transparent we could see city name through the color(will not be possible for all color but some of them) and should be easier to see where the location is. We don't live in the same country so we don't know the geography, so city names will help us a lot.

@lovelaced
Copy link

+1, doing the same kind of thing here.

@JonasLoos
Copy link
Contributor

this might have been solved by #10

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

No branches or pull requests

4 participants