bug :lady_beetle:good first issue
仓库指标
- 星标
- (10,532 个星标)
- PR 合并指标
- (PR 指标待抓取)
描述
mapbox-gl-js version: v2.4.0
browser: Chrome Version 92.0.4515.159
Steps to Trigger Behavior
Reproduce steps
- add
Map.on('load', func) - add
Map.off('load', func) - add
Map.on('load', func2) - call
Map.setStyle()
Link to Demonstration
https://jsfiddle.net/tsuzk/6o8m9nad
This should work because of this test
Expected Behavior
The Map.on('load', func2) should get called after Map.setStyle()
Actual Behavior
The Map.on('load', func2) does not get called after Map.setStyle()
Workaround
re-instantiate the map with a new stlye https://jsfiddle.net/tsuzk/6o8m9nad/1/
Other info
- This occurs on v1.9.0 so it's not a new behavior in v2.
Priority
Low, since there is a proper workaround