()
| 181 | this.loggedMessages = new Set(); |
| 182 | } |
| 183 | disconnectedCallback() { |
| 184 | // if the map-layer node is removed from the dom, the layer should be |
| 185 | // removed from the map and the layer control |
| 186 | if (this.hasAttribute('data-moving')) return; |
| 187 | this._onRemove(); |
| 188 | |
| 189 | if (this._mql) { |
| 190 | if (this._changeHandler) { |
| 191 | this._mql.removeEventListener('change', this._changeHandler); |
| 192 | } |
| 193 | delete this._mql; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | _onRemove() { |
| 198 | if (this._observer) { |