Simplify mapboxgl control container removal
This commit is contained in:
@@ -60,9 +60,7 @@ class Mapbox extends Layer {
|
|||||||
this.mbmap.getCanvas().remove();
|
this.mbmap.getCanvas().remove();
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
this.map_.render();
|
this.map_.render();
|
||||||
[
|
this.mbmap.getContainer().querySelector('.mapboxgl-control-container').remove();
|
||||||
'mapboxgl-control-container'
|
|
||||||
].forEach(className => document.getElementsByClassName(className)[0].remove());
|
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
this.mbmap.on('render', function() {
|
this.mbmap.on('render', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user