title: Click on a MapAnnotation to expand view - SwiftUI
body: <p>I have a MapAnnotation in SwiftUI. On user interaction with a annotation, can I display another piece of information, i.e., change the label or show additional options?</p>
  <pre><code>Map(coordinateRegion: $region, annotationItems: places) { place in
      MapAnnotation(coordinate: place.coordinate) {
          HStack {
              Image(systemName: &quot;heart.fill&quot;)
                  .foregroundColor(.red)
              Text(place.name)
                  .fixedSize()
          }.padding(8)
           .background(Color.white)
           .clipShape(RoundedRectangle(cornerRadius: 20.0, style: .continuous))
           .overlay(
               Image(systemName: &quot;arrowtriangle.left.fill&quot;)
                   .rotationEffect(Angle(degrees: 270))
                   .foregroundColor(.white)
                   .offset(y: 10)
  
               , alignment: .bottom)
      }
  }
  </code></pre>