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

Automatically choose layers based on source layers #1

Open
1ec5 opened this issue Nov 17, 2017 · 2 comments
Open

Automatically choose layers based on source layers #1

1ec5 opened this issue Nov 17, 2017 · 2 comments
Labels
enhancement iOS SDK parity Needed for feature parity with the Mapbox Maps SDK for iOS

Comments

@1ec5
Copy link

1ec5 commented Nov 17, 2017

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

@1ec5 1ec5 added enhancement iOS SDK parity Needed for feature parity with the Mapbox Maps SDK for iOS labels Nov 17, 2017
@tristen
Copy link
Member

tristen commented Nov 17, 2017

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.

@andrewharvey
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement iOS SDK parity Needed for feature parity with the Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

3 participants