Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MKMapView NSInvalidArgumentException Invalid Region crash in ios6

Tags:

Program crashes when set location coordinates using MKMapView. Log:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid Region <center:+112.57075000, +37.87049600 span:+0.05165163, +0.43945312>'

span in my program is

MKCoordinateSpan span;
span.latitudeDelta = .05;
span.longitudeDelta = .02;

after coding:

    self.mMKMapview.region = [self.mMKMapview regionThatFits:region];

as the log shows, span changes to :+0.05165163, +0.43945312

anyone help please, I have been standstill here for two days.

Thanks!