From 965df81c4ba57d1344c568feafe54d0fc48fdd4d Mon Sep 17 00:00:00 2001 From: Robin Hawkes Date: Mon, 16 Jan 2017 12:18:45 +0000 Subject: [PATCH] Remove attribution on layer removal --- src/World.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/World.js b/src/World.js index 41a1dfe..4175424 100644 --- a/src/World.js +++ b/src/World.js @@ -277,6 +277,10 @@ class World extends EventEmitter { this._layers.splice(layerIndex, 1); }; + if (layer._options.attribution) { + this._removeAttribution(layer._options.id); + } + if (layer.isOutput() && layer.isOutputToScene()) { this._engine._scene.remove(layer._object3D); this._engine._domScene3D.remove(layer._domObject3D);