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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
A useful addition to our current Layer API is exposing sourceLayerIdentfier, while we use it internally we don't expose a getter for it. Such a getter can be useful to filter layers. For example take traffic, you want to add a traffic layer just above all other road layers. For this you would need to get all the style layers and filter out the ones with sourceLayerIdentifier="road".
Alternatively to exposing a getter we could also solve this use-case with a getLayers(String sourceLayerIdentfier) this might be a bit cleaner as we don't require the user to get all layers and do the filtering themselves.
@tobrun Let's start off with a getter and see if there are actual use cases for a filtered getter. If that's the case, I'd like to make it a little more extensible with a filter object that can have a number of properties to filter on (like the source name).
Activity
tobrun commentedon Apr 7, 2017
Alternatively to exposing a getter we could also solve this use-case with a
getLayers(String sourceLayerIdentfier)this might be a bit cleaner as we don't require the user to get all layers and do the filtering themselves.Thoughts @ivovandongen?
ivovandongen commentedon Apr 11, 2017
@tobrun Let's start off with a getter and see if there are actual use cases for a filtered getter. If that's the case, I'd like to make it a little more extensible with a filter object that can have a number of properties to filter on (like the source name).
tobrun commentedon Apr 11, 2017
Will work on adding the getter, 👍 on the filter idea.