Guest User

Untitled

a guest
Jan 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. - (id)initWithMapRect:(MKMapRect)mapRect
  2. {
  3. MKMapPoint nwMapPoint = MKMapPointMake(mapRect.origin.x, mapRect.origin.y);
  4. MKMapPoint seMapPoint = MKMapPointMake(mapRect.origin.x + mapRect.size.width, mapRect.origin.y + mapRect.size.height);
  5. CLLocationCoordinate2D nwCoord = MKCoordinateForMapPoint(nwMapPoint);
  6. CLLocationCoordinate2D seCoord = MKCoordinateForMapPoint(seMapPoint);
  7. return [self initWithWithNorth:nwCoord.latitude
  8. west:nwCoord.longitude
  9. south:seCoord.latitude
  10. east:seCoord.longitude];
  11. }
Add Comment
Please, Sign In to add comment