I have been working on the same application for several months, and this is a new problem. I am wondering if there have been any changes on the side of the Apple Map data server. Here's the problem:
My application (from time to time) wants to set the MKMapView area to the highest possible scalable value in a specific location. For this, I am doing something like:
self.map.mapType = MKMapTypeHybrid; MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(CLLocationCoordinate2DMake(item.lat, item.lng), 1.0, 1.0); [self.map setRegion:region animated:NO];
No matter where the item's coordinate is, I get a background with a βno satellite imageryβ grid. This does not appear to be related to satellite imagery, as it behaves consistently in many areas of the United States.
I know that setRegion:animated: can adjust the area after the fact. And I know that a 1 m square is an unreasonably small area to try to show on a rather large map. So I tried
[self.map setRegion:[self.map regionsThatFits:region] animated:NO];
Setting animated:YES really prevents this from happening, but I don't want to animate these changes.
A few observations:
- If I reduce only 1 or 2 pixels, a map image appears.
- Trying to implement a map delegation method:
β mapViewDidFailLoadingMap:withError: does not help. He is never called. - It seems new. The working version that I have in the app in the app store now shows similar problems.
- I recently saw this in other popular apps.
Any thoughts on resolving this issue or confirming that this is a system problem?
source share