media/DSMapView

DSMapView

media
since v2.0

MapKit 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.

Interactive Reference

Live showroom

Need the full visual surface?

Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().

Best for exploring:

variants, states, categories, and real app examples in one place.

Props

PropTypeDefaultDescription
coordinatereqCLLocationCoordinate2Dโ€”Center coordinate.
spanMKCoordinateSpanMKCoordinateSpan(0.01, 0.01)Visible map region.
showPinBooltrueShows a pin at the coordinate.
pinLabelString?nilCallout label on the pin.
showUserLocationBoolfalseShows the blue user dot.
heightCGFloat200Map 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
)