You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a map control calls a method that accesses the style in onRemove then an error is thrown and the map removal fails.
This is heavily related to #7477. Fixing it would fix the error here but we might want to move removing the controls to before the setStyle(null) here so that the onRemove has access to the style:
If a map control calls a method that accesses the style in
onRemove
then an error is thrown and the map removal fails.This is heavily related to #7477. Fixing it would fix the error here but we might want to move removing the controls to before the
setStyle(null)
here so that the onRemove has access to the style:mapbox-gl-js/src/ui/map.js
Lines 1672 to 1679 in 42d1a5a
mapbox-gl-js version: master
browser: all
Steps to Trigger Behavior
onRemove
, for examplemap.getLayer("background")
Link to Demonstration
https://jsbin.com/tarecanedo/1/edit?html,output
Expected Behavior
Either:
Actual Behavior
Uncaught TypeError: Cannot read property 'getLayer' of undefined
and map fails to remove.The text was updated successfully, but these errors were encountered: