-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Setting { fill | line }-pattern to "" invalidates other { fill | line }-* properties #8331
Comments
@chloekraw can you elaborate on why it is important for these properties to be usable on the same layer? The workaround to this issue is to use a |
@asheemmamoowala does an implementation with that workaround work when you are building an interactive map that allows users to filter the data dynamically on one or more dimensions? Your goal would be to visually distinguish some data based on a user's filters with patterns and other data with opaque colors, so the filtering happens at runtime. In this case, is it possible to dynamically re-allocate source data into different layers at runtime? |
Yes, this would work by updating the |
The thing is layers are used for more than drawing: they have an impact on interactivity, queries etc., so adding more layers also adds complexity to the application itself which is not ideal. I am not sure of the performance impact either but I suppose having very frequent changes in the |
I have a very similar use case! Dynamically selecting lines, and wanting to show a pattern for selected lines only. Using filtering makes the code more complex than I think it should be! |
Ticket to track the same issue in GL-JS that appears on GL-Native as documented in mapbox/mapbox-gl-native#14331.
Steps to reproduce
line-pattern
to "" (empty string) on a layer.Expected behavior
Users who want to use a patterned and non-patterned line in the same layer can do so by setting
line-pattern
to""
orundefined
.Users have reported trying to use this as a workaround for lack of DDS support in
line-dasharray
(#3045). Similar behavior occurs if you try to render a patterned fill and non-patterned fill in the same layer.Actual behavior
Other paint properties such as
line-color
andline-dasharray
are overwritten, so no line is drawn.Configuration
Browser: All
Operating systems + versions: All
The text was updated successfully, but these errors were encountered: