Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (IBAction) showAddress // THIS IS A BUTTON WHICH LOCATES COORDINATES
- {
- [addressField resignFirstResponder];
- MKCoordinateRegion region;
- MKCoordinateSpan span;
- span.latitudeDelta=0.2;
- span.longitudeDelta=0.2;
- CLLocationCoordinate2D location = [self addressLocation];
- region.span=span;
- region.center=location;
- [mapView setRegion:region animated:TRUE];
- [mapView regionThatFits:region];
- if (location.longitude = (double) -73.2125)
- {
- addAnnotation = [[AddressAnnotation alloc]initWithCoordinate:location];
- [self.mapView removeAnnotation:addAnnotation];
- }
- else
- {
- addAnnotation = [[AddressAnnotation alloc]initWithCoordinate:location];
- [self.mapView addAnnotation:addAnnotation];
- [addAnnotation release];
- }
- }
- if (location.longitude = (double) -73.2125)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement