media/DSMapView
DSMapView
mediaMapKit wrapper with a pin annotation, user location dot, and a rounded-corner container style matching the DS.
iOS 17+macOS 14+
Purpose
Location display on profile, delivery tracking, event detail, and store finder screens.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| coordinatereq | CLLocationCoordinate2D | โ | Center coordinate. |
| span | MKCoordinateSpan | MKCoordinateSpan(0.01, 0.01) | Visible map region. |
| showPin | Bool | true | Shows a pin at the coordinate. |
| pinLabel | String? | nil | Callout label on the pin. |
| showUserLocation | Bool | false | Shows the blue user dot. |
| height | CGFloat | 200 | Map view height. |
Examples
Event location card
Map embedded in an event detail screen.
swift
DSMapView(
coordinate: event.location.coordinate,
span: MKCoordinateSpan(latitudeDelta: 0.005, longitudeDelta: 0.005),
pinLabel: event.venue,
height: 180
)