5
votes

I have a view controller for my Map View. Inside the viewDidLoad method, I'm setting the mapview's delegate to the controller (self) and then I'm adding the MKOverlay object. But my mapView:viewForOverlay: method is not getting called, so I still can't get anything to display on my map.

Thanks

1
Show the code that adds the overlay object and the viewForOverlay method. - user467105

1 Answers

6
votes

Chances are you haven't set up the coordinate or boundingMapRect properties on the MKOverlay correctly. The MapView will only ask for the view if it thinks there is a possibility that it is visible, if its visible rect doesn't intersect the boundMapRect, it won't.