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

Add a per-layer opacity property #3062

Open
FloChehab opened this issue Sep 4, 2023 · 7 comments
Open

Add a per-layer opacity property #3062

FloChehab opened this issue Sep 4, 2023 · 7 comments
Labels
enhancement New feature or request need more info Further information is requested

Comments

@FloChehab
Copy link

Hello,

User Story

As a user I would like to have an opacity setting at the layer level to avoid "additive opacity" inside the same layer.

Rationale

Here is an example with the current situation:
image
(Screenshot from https://jsfiddle.net/wq8gk2z5/22/)

We can see that the resulting line has actually ~4 colors due to the way it's rendered. I would like the rendered line to be a single color / opacity no matter how many times it crosses itself.

Impact

Would be a nice addition.

Related

@HarelM
Copy link
Member

HarelM commented Sep 4, 2023

Might be related to the following: #1191
This PR is out of sync and very old unfortunately...

@HarelM HarelM added enhancement New feature or request need more info Further information is requested labels Sep 4, 2023
@FloChehab
Copy link
Author

FloChehab commented Sep 18, 2023

Hello @HarelM,

I have been chatting with a colleague of mine @philae-ael in the recent days as I know his general interest with the matter being discussed here. And... he has done few POCs already.
As happy users of Maplibre, we are willing to allocate a bit of his professional time to contribute back 🚀

I'll let the mic to him but I'll keep an interested eye on what's happening here 🤓

I guess the next step would be to discuss the actual objective(s) and the different approaches possible and the one that are the most likely to get merged ; what we should be careful, etc. On my side I can help track / followup things if welcomed.

All the best !

@HarelM
Copy link
Member

HarelM commented Sep 18, 2023

If there's a need to update the current style spec with new properties, the best place to discuss this is the style-spec repo and bring it up in the monthly meeting to see what people in the community think and what things we might have forgot to take into consideration.
Any contribution is welcomed! :-)

@FloChehab
Copy link
Author

Great, we will try to kick-off a new discussion there in the coming days.

@FloChehab
Copy link
Author

FloChehab commented Sep 18, 2023

Digging a bit more we found mapbox/mapbox-gl-js#11082, @HarelM any ideas on if we could bring something that resembles to Maplibre (this has no impact on the spec) or should we try to give another shot to #1191 - or some version dedicated to lines only for now ?

@HarelM
Copy link
Member

HarelM commented Sep 19, 2023

If we could fix it without a style spec change it would be great.
We can't copy code from mapbox as of version 2.0 and I think the above PR is dated after the fork of this repo and the license change.
In order not to infringe copyright laws we should avoid looking at the linked code.

@pnorman
Copy link

pnorman commented Feb 5, 2024

This is an example of the problem with real-world data and inset lines.

image

This makes it flat-out impossible to implement a copy of OpenStreetMap Carto in Maplibre, as it relies on transparent inset lines for national parks, tourism, and some other features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants