(isDark: boolean)
| 56 | } |
| 57 | |
| 58 | private updateTileLayer(isDark: boolean) { |
| 59 | if (!this.map || !this.L) return; |
| 60 | const L = this.L; |
| 61 | |
| 62 | const url = isDark |
| 63 | ? 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png' |
| 64 | : 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png'; |
| 65 | |
| 66 | if (this.tileLayer) { |
| 67 | this.tileLayer.setUrl(url); |
| 68 | } else { |
| 69 | this.tileLayer = L.tileLayer(url, { maxZoom: 20 }).addTo(this.map); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | private updateMarkers(activeUnitId: string | null = null) { |
| 74 | if (!this.map || !this.L) return; |
no outgoing calls
no test coverage detected