diff --git a/ios/Classes/FinAppletExt/Common/Util/Map/FATMapViewController.m b/ios/Classes/FinAppletExt/Common/Util/Map/FATMapViewController.m index f36d987..9f5b2fa 100644 --- a/ios/Classes/FinAppletExt/Common/Util/Map/FATMapViewController.m +++ b/ios/Classes/FinAppletExt/Common/Util/Map/FATMapViewController.m @@ -199,6 +199,15 @@ static NSString *kUserAnnotationId = @"FATUserAnnotationViewId"; CLLocationCoordinate2D centerCoord = {[self judgeLatition:[self.latitude doubleValue]], [self judgeLongitude:[self.longitude doubleValue]]}; MKCoordinateRegion region = MKCoordinateRegionMake(centerCoord, MKCoordinateSpanMake(LongitudeDelta, LongitudeDelta)); + CLLocationCoordinate2D center = region.center; + MKCoordinateSpan span = region.span; + if (center.latitude < -90 || center.latitude > 90 || + center.longitude < -180 || center.longitude > 180) { + return ; + } + if (span.latitudeDelta <= 0 || span.longitudeDelta <= 0) { + return ; + } [self.mapView setRegion:region animated:YES]; }