-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
setPaintProperty not work on click event #8273
Comments
Hi @longwind91, sorry I don't have better news but yes this is a bug and your code should work as you expect. I looked into this today and can reproduce this issue across as many browsers and platforms as I tested. I have yet to find the source or explanation for the bug. I'll update this issue as soon as I do, hopefully with a workaround you can use while we integrate the fix. Thank you for your submission (and your patience). |
Thanks for your reply. Looking forward to the bug being fixed |
Hi @longwind91 we have integrated the fix. If you grab our newest source (and build mapbox-gl-js yourself) you could start using this immediately. If you'd like to wait for our official release, in the meantime you can use a workaround. Place this immediately following any
The idea is to force "re-layout" on whatever layer you are updating, so for example if you had other layers you'd use their Hope this helps, thanks for the report! |
mapbox-gl-js version: 0.54.0
browser: chrome
Steps to Trigger Behavior
click map to excute setPaintProperty function, but it don't work, the property line-pattern not changed
Link to Demonstration
https://jsbin.com/rukoji/edit?js,output
Expected Behavior
change paint property, the line-pattern will be greenArrow
Actual Behavior
don't work, the line-pattern is still redArrow
The text was updated successfully, but these errors were encountered: