File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
GoInfoGame/GoInfoGame/UI/Map Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ struct CustomMap: UIViewRepresentable {
8484
8585 // Remove existing overlays
8686 mapView. overlays. forEach { mapView. removeOverlay ( $0) }
87-
87+
88+ // Add shadow overlay with rectangular cutouts
89+ if mapView. overlays. first ( where: { $0 is ShadowOverlay } ) == nil {
90+ let overlay = ShadowOverlay ( annotations: mapView. annotations)
91+ mapView. addOverlay ( overlay)
92+ }
93+
94+
8895 // Re-add overlays based on selection
8996 if useBingMaps {
9097 let tileOverlay = BingTileOverlay ( )
@@ -183,6 +190,10 @@ struct CustomMap: UIViewRepresentable {
183190 return renderer
184191 }
185192
193+ if let shadowOverlay = overlay as? ShadowOverlay {
194+ return ShadowOverlayRenderer ( overlay: shadowOverlay)
195+ }
196+
186197 if let tileOverlay = overlay as? MKTileOverlay {
187198 return MKTileOverlayRenderer ( tileOverlay: tileOverlay)
188199 }
You can’t perform that action at this time.
0 commit comments