CitiLogics / citilogics-geoloop-panel

Animated Maps in Grafana
MIT License
44 stars 6 forks source link

Transparent polygon #6

Open flopp999 opened 6 years ago

flopp999 commented 6 years ago

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 commented 6 years ago

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

any interest in opening a PR?

flopp999 commented 6 years ago

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 https://github.com/CitiLogics/citilogics-geoloop-panel/blob/8eb1db504af72d1e9737fd7f833806dc6bec8098/src/geoloop.js#L138

samhatchett commented 6 years ago

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: https://github.com/CitiLogics/citilogics-geoloop-panel/blob/8eb1db504af72d1e9737fd7f833806dc6bec8098/src/geoloop.js#L230

... 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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

+1, doing the same kind of thing here.

JonasLoos commented 3 years ago

this might have been solved by #10