Skip to content

Conversation

@jonathonwpowell
Copy link

The goal of this PR is to fix #190

Currently if a user of Mapbox GL JS is using this component and they want to switch styles, they need to remove and re-add the directions component. But due to how the onAdd function works, it will not trigger the re-addition of some styles, as it will wait for a load event that will never come. Instead this subscribes to the idle event and then unsubscribes itself once it has triggered.

Please let me know if I can improve the PR in any way :)

@xiaofanliang
Copy link

Any updates on this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing map style causes plugin to throw errors

2 participants