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

Layer removed when moveLayer(id, beforeId?) id === beforeId #6501

Closed
jcozain opened this issue Apr 11, 2018 · 1 comment
Closed

Layer removed when moveLayer(id, beforeId?) id === beforeId #6501

jcozain opened this issue Apr 11, 2018 · 1 comment
Labels

Comments

@jcozain
Copy link

jcozain commented Apr 11, 2018

if both parameters point to the same layer the layer is removed silently

example :
map.moveLayer("roads", "roads")
console.log(this.map.getStyle().layers)
roads layer will be gone

i guess it should fail or leave the layer in place

@anandthakker
Copy link
Contributor

Thanks for the report, @jcozain !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants