1 Do map positioning today, find this problem, call the following function, there is a problem
Mkcoordinateregion region = Mkcoordinateregionmake (_currentlocationcoordinate, Mkcoordinatespanmake (ZoomLevel, Zoomlevel)); [_mapview Setregion:[_mapview regionthatfits:region] animated:yes];
Exception: ' Invalid region <center:+inf, +0.00000000 span:+1.00000000, +0.50000000> ' when trying to display the map
2 degrees Niang a bit, the original is out of range, plus range judgment
if ((Region.center.latitude >= -90) && (region.center.latitude <=) && (region.center.longitude >= -180) && (region.center.longitude <=)) { [_mapview setregion:[_mapview regionthatfits:region] Animated:yes]; } else{ NSLog (@ "Invilid region"); }
3 The fundamental, data error, and later found the reason, latitude 118, wrong, has exceeded the range-90<=latitude<=90 -180<=longtitude<=180
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Map location Error Exception: ' Invalid region