(map: any, overlays: any[])
| 138 | } |
| 139 | |
| 140 | function removeOverlays(map: any, overlays: any[]) { |
| 141 | for (const overlay of overlays) { |
| 142 | if (!overlay) continue; |
| 143 | try { |
| 144 | map.remove(overlay); |
| 145 | } catch { |
| 146 | overlay.setMap?.(null); |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | function applyOverlayOptions(overlay: any, options: Record<string, unknown>) { |
| 152 | if (overlay?.setOptions) { |