MapKit features have been extended for SwiftUI, enabling the design of more expressive and interactive maps using Views and View Modifiers.
You can use the
Annotation view to create customised annotations for your maps. Like a standard annotation, it takes a label and coordinate, but can then be customized to show any SwiftUI view.
Let’s create a custom annotation for our garage with an icon in a rounded rectangle.