Skip to content

Conversation

@andrewharvey
Copy link

map.on('style.load') is only called if registered before the style resource has loaded, so in the case that the control is added to the map after the style resource has already loaded it won't trigger. Therefore within control onAdd we should check if the map style resource is already loaded and if so immediately trigger the initialStyleUpdate.

…ady loaded

`map.on('style.load')` is only called if registered before the style resource has loaded, so in the case that the control is added to the map after the style resource has already loaded it won't trigger. Therefore within control `onAdd` we should check if the map style resource is already loaded and if so immediately trigger the `initialStyleUpdate`.
@teenageknight
Copy link

+1 on this

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.

2 participants