Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mapView:viewForOverlay: not getting called

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

like image 804
FishStix Avatar asked Nov 11 '10 09:11

FishStix


1 Answers

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.

like image 74
Chromo Avatar answered Sep 20 '22 01:09

Chromo