2

I have an MKMapView set up and how I want to to look. What I want to add is an Annotation that stays always on screen.

That means that the pin is always visible, and I can drag and drop the MapView. I want the annotation view to display the Lat&Long, which would be updated if the map is moved around in the background.

I have all this working, but I don't understand how to keep the annotation pin static on the screen. If I drag and drop the map, the pin will go out of view..

MyTaxi and Hailo has the functionality that I am looking for.

A

  • I suggest putting a UIView with user interaction disabled containing a label and _image_ of a pin above the map view's center (_not_ as subview of the map) instead of adding an annotation. When map moves, update the label with mapView.centerCoordinate. –  Oct 02 '13 at 22:37

1 Answers1

2

Ok, so basically the answer is to add some artwork on top of the MKMapView.. i.e. a UIImageView then use MKMapViews centerCoordinate to get the lat&long for the location.

(void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated will inform you if the MKMapView has been changed.

Silly silly Andrew...