---
title: MapMarker
framework: mapkit
role: symbol
role_heading: Structure
path: mapkit/mapmarker
---

# MapMarker

A balloon-shaped annotation used to indicate the location on a map.

## Declaration

```swift
struct MapMarker
```

## Overview

Overview Create a Map and display marker annotations by returning a view that conforms to MapAnnotationProtocol, such as MapMarker, from the trailing closure of init(coordinateRegion:interactionModes:showsUserLocation:userTrackingMode:annotationItems:annotationContent:) or init(mapRect:interactionModes:showsUserLocation:userTrackingMode:annotationItems:annotationContent:). Items you provide as a collection to the source annotations need to conform to Identifiable. For example, the following code displays a map with a marker annotation: struct IdentifiablePlace: Identifiable {     let id: UUID     let location: CLLocationCoordinate2D     init(id: UUID = UUID(), lat: Double, long: Double) {         self.id = id         self.location = CLLocationCoordinate2D(             latitude: lat,             longitude: long)     } }

struct PinAnnotationMapView: View {     let place: IdentifiablePlace     @State var region: MKCoordinateRegion

var body: some View {         Map(coordinateRegion: $region,             annotationItems: [place])         { place in             MapMarker(coordinate: place.location,                    tint: Color.purple)         }     } }

## Topics

### Creating a map marker

- [init(coordinate:tint:)](mapkit/mapmarker/init(coordinate:tint:).md)

## Relationships

### Conforms To

- [MapAnnotationProtocol](mapkit/mapannotationprotocol.md)

## See Also

### Structures

- [MapAnnotation](mapkit/mapannotation.md)
- [MapPin](mapkit/mappin.md)
