You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I'm working on an app that shows different categories of features:
(in this picture there are multiple features that belong to the categories G and P)
I've created a custom Style and everything's working fine but now I want to add a button that makes me able to show only one category or the other (or both) as if I'm Filtering the Data of the Layer from the MapBox Studio:
Following the example it looks like i need to create a new Style in MapBox Studio and switch beetwen the two but the problem is that I have 30+ categories, which i would also like to combine (G + P + C or G + C or P + C ...) this would require building hundreds of styles for every combination ... which is far from ideal.
So my question is:
Is there a way to change the features shown in a layer whitout creating Styles for every category of feature I need to show?
Thanks in advance!
If I can provide more info just let me know.
The text was updated successfully, but these errors were encountered:
You can do this right now, but its not super nice:
1. add the layers as components to the style in mapbox studio 2. add the vector layers to the source(s) added in (1) example
(Note that i have not tested this so there might be some issues that i am not aware of)
If you wait for #797 you would be able to add the vector sources on the fly as well.
This wont work because the layers currently don't support filtering. Implementing this is not super hard but someone has to do it. (might be me as i need this as well - but i can give you no timeline)
Thanks!! I would love to help (as I really needs this feature) but unfortunately I'm not in the position of helping right know (I really don't know what I'm doing).
In the meantime i discovered that i can at least remove a layer.
For example if I wanted to remove the layer ztl-bergamo
I just needs to do mapController?.removeLayer("ztl-bergamo");
This would actually be very usefull if it wasn't that it seems like there's no way of putting it back ...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi everyone,
I'm working on an app that shows different categories of features:
(in this picture there are multiple features that belong to the categories G and P)
I've created a custom Style and everything's working fine but now I want to add a button that makes me able to show only one category or the other (or both) as if I'm Filtering the Data of the Layer from the MapBox Studio:
Following the example it looks like i need to create a new Style in MapBox Studio and switch beetwen the two but the problem is that I have 30+ categories, which i would also like to combine (G + P + C or G + C or P + C ...) this would require building hundreds of styles for every combination ... which is far from ideal.
So my question is:
Is there a way to change the features shown in a layer whitout creating Styles for every category of feature I need to show?
Thanks in advance!
If I can provide more info just let me know.
The text was updated successfully, but these errors were encountered: