Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return serialized style layer from map.getLayer() #4742

Closed
anandthakker opened this issue May 23, 2017 · 2 comments
Closed

Return serialized style layer from map.getLayer() #4742

anandthakker opened this issue May 23, 2017 · 2 comments
Labels
api 📝 breaking change ⚠️ Requires a backwards-incompatible change to the API

Comments

@anandthakker
Copy link
Contributor

Currently, map.getLayer() returns a StyleLayer object, which has methods like setPaintProperty, etc. This is misleading, because StyleLayer's setters are not intended to be user-facing: to work properly, they depend on being called as part of the batch updating flow that's managed by the Style object.

I think it would be clearer to just return a serialized version of the layer from map.getLayer().

@anandthakker anandthakker added api 📝 breaking change ⚠️ Requires a backwards-incompatible change to the API labels May 23, 2017
@anandthakker
Copy link
Contributor Author

Refs #4738

@jfirebaugh
Copy link
Contributor

Duplicate of #3713.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api 📝 breaking change ⚠️ Requires a backwards-incompatible change to the API
Projects
None yet
Development

No branches or pull requests

2 participants