How to convert CGRect to MapRect
问题 I created a method as below to convert a CGRect to MapRect as below - (MKMapRect)mapRectForRect:(CGRect)rect { CLLocationCoordinate2D topleft = [mapView convertPoint:CGPointMake(rect.origin.x, rect.origin.y) toCoordinateFromView:canvasView]; CLLocationCoordinate2D bottomeright = [mapView convertPoint:CGPointMake(CGRectGetMaxX(rect), CGRectGetMaxY(rect)) toCoordinateFromView:canvasView]; MKMapPoint topleftpoint = MKMapPointForCoordinate(topleft); MKMapPoint bottomrightpoint =