MapView: viewForOverlay: does not receive a call

I have a view controller for my map view. Inside the viewDidLoad method, I set the mapview delegate to the controller (self), and then add the MKOverlay object. But my mapView: viewForOverlay: method is not called, so I can’t display anything on my map.

thank

+5
source share
1 answer

Most likely, you did not configure the coordinate properties or boundingMapRect on MKOverlay correctly. A MapView will only request a view if it considers it possible, if its visible rectangle does not intersect boundMapRect, it will not.

+6
source

All Articles