Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (self.isBeingPresented) {
- //set the map delegate
- MapView.delegate = self;
- //set the co-ords
- CLLocationCoordinate2D zoomLocation;
- zoomLocation.latitude = LAT_POSN;
- zoomLocation.longitude= LON_POSN;
- //create region
- MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(zoomLocation, startZoom, startZoom);
- MKCoordinateRegion adjustedRegion = [MapView regionThatFits:viewRegion];
- [MapView setRegion:adjustedRegion animated:YES];
- //create a new insatnce of the map overlay object
- MapOverlay * mapOverlay = [[MapOverlay alloc] init];
- //added the over lay
- [MapView addOverlay:mapOverlay];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement