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

Add initializer to set sourceLayer in MGLStyleLayer #6252

Closed
boundsj opened this issue Sep 6, 2016 · 2 comments
Closed

Add initializer to set sourceLayer in MGLStyleLayer #6252

boundsj opened this issue Sep 6, 2016 · 2 comments
Assignees
Labels
iOS Mapbox Maps SDK for iOS runtime styling
Milestone

Comments

@boundsj
Copy link
Contributor

boundsj commented Sep 6, 2016

In the GL JS example for adding a third party vector source and also in this Android demo app example the source-layer property can be set to a specific layer.

The iOS MGL*StyleLayer classes do not offer a way to set this value either in the initializers in the MGLStyleLayer protocol or via a property or setter method. This feature is important for styling sources that have many layers.

cc @1ec5 @frederoni

@boundsj boundsj added iOS Mapbox Maps SDK for iOS runtime styling labels Sep 6, 2016
@boundsj boundsj added this to the ios-v3.4.0 milestone Sep 6, 2016
@jfirebaugh
Copy link
Contributor

Note that the core setter isn't hooked up internally to cause a refresh, so it only works when called prior to adding the source to the style. I don't foresee any technical blocker to allowing on-the-fly mutation, but it's probably not a big priority (GL JS doesn't have such an API for example).

@boundsj boundsj self-assigned this Sep 7, 2016
@boundsj boundsj changed the title Expose setter for sourceLayer in MGL*StyleLayer classes Add initializer to set sourceLayer in MGLStyleLayer Sep 7, 2016
@boundsj
Copy link
Contributor Author

boundsj commented Sep 7, 2016

Thanks for pointing that out @jfirebaugh. I adjusted the title of this issue and also proposed a fix (to add an init method only, no setter) in #6269

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS runtime styling
Projects
None yet
Development

No branches or pull requests

2 participants