Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

Automatically choose layers based on source layers #1

Open

Description

@1ec5

The iOS implementation in mapbox/mapbox-gl-native#9950 automatically chooses style layers to query based on the source layers they render. On iOS, we hard-code Mapbox Streets source v7 layers that correspond to information that would be labeled on a standard map:

https://github.com/mapbox/mapbox-gl-native/blob/dcd7da14f6627a09a5840a3046b5708449962f69/platform/darwin/src/MGLStyle.mm#L758-L774

I can see an argument for letting the developer choose which style layers to make accessible. That could be useful for data vis maps, which are less common on mobile platforms. Still, choosing a sensible set of style layers based on a sensible set of source layers would alleviate the developer from having to figure out all the layer IDs in their style, which can be a pretty tedious affair.

/cc @tristen

Activity

  1. added
    iOS SDK parity
    on Nov 17, 2017
  2. tristen commented on Nov 17, 2017

    @tristen
    Member

    I think a sensible set of layers that align with Streets or other core styles is a good idea. This could be an option in the plugin (choose a default).

    I do like the option of a developer choosing the layers to make accessible but that could be secondary to ^. It also provides a mechanism for custom source layers added: accessibility can easily be applied to them as well.

  3. andrewharvey commented on Apr 29, 2018

    @andrewharvey
    Collaborator

    That could be useful for data vis maps

    I think a sensible set of layers that align with Streets or other core styles is a good idea. This could be an option in the plugin (choose a default).

    👍 In the projects I've implemented hidden accessible HTML Elements sitting on top of the symbol or circle layers, it's always been for cluster circles or marker pins (using Symbol) which sit on top of the base map.

    So I think for a lot of use cases, an app might choose to only make the markers they add on top of the standard basemap accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementiOS SDK parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions