()
| 195 | } |
| 196 | |
| 197 | _onRemove() { |
| 198 | if (this._observer) { |
| 199 | this._observer.disconnect(); |
| 200 | } |
| 201 | let l = this._layer, |
| 202 | lc = this._layerControl, |
| 203 | lchtml = this._layerControlHTML; |
| 204 | |
| 205 | if (l) { |
| 206 | l.off(); |
| 207 | } |
| 208 | // if this layer has never been connected, it will not have a _layer |
| 209 | if (l && l._map) { |
| 210 | l._map.removeLayer(l); |
| 211 | } |
| 212 | |
| 213 | if (lc && !this.hidden) { |
| 214 | // lc.removeLayer depends on this._layerControlHTML, can't delete it until after |
| 215 | lc.removeLayer(l); |
| 216 | } |
| 217 | // remove properties of layer involved in whenReady() logic |
| 218 | if (this._layerRegistry) { |
| 219 | this._layerRegistry.clear(); |
| 220 | } |
| 221 | delete this._layer; |
| 222 | delete this._layerControl; |
| 223 | delete this._layerControlHTML; |
| 224 | delete this._fetchError; |
| 225 | this.shadowRoot.innerHTML = ''; |
| 226 | if (this.src) this.innerHTML = ''; |
| 227 | } |
| 228 | |
| 229 | connectedCallback() { |
| 230 | if (this.hasAttribute('data-moving')) return; |
no outgoing calls
no test coverage detected