Skip to content

Add an Annotation

Create an MLNPointAnnotation, set its coordinate, and add it to the map view. The default annotation renders a standard pin.

let annotation = MLNPointAnnotation()
annotation.coordinate = CLLocationCoordinate2D(latitude: 48.21, longitude: 16.37)
annotation.title = "Vienna"
mapView.addAnnotation(annotation)

Adopt MLNMapViewDelegate if you want callouts or custom annotation views.