Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Expose sourceLayerIdentifier on Layer #8663

Closed

Description

@tobrun

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".

Activity

  1. added
    Android
    on Apr 6, 2017
  2. added this to the android-v5.1.0 milestone on Apr 7, 2017
  3. tobrun commented on Apr 7, 2017

    @tobrun
    MemberAuthor

    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?

  4. ivovandongen commented on Apr 11, 2017

    @ivovandongen
    Contributor

    @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).

  5. tobrun commented on Apr 11, 2017

    @tobrun
    MemberAuthor

    Will work on adding the getter, 👍 on the filter idea.

  6. self-assigned this
    on Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidruntime styling

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions