Create Annotation from Placemark?

How do I display a Placemark on a map?


It seems like there should be some simple way of initializing an Annotation with a Placemark, but I'm not finding it.


Frank

Replies

If you have a MKPlacemark, you can pass it to addAnnotation directly, as MKPlacemark confirms to the MKAnnotation protcol.


If you have a CLPlacemark, you'll need to make it the data conform to the MKAnnotation protocol. You can do this by initalizing a MKPlacemark with init(placemark:).