-(void)viewWillAppear:(BOOL)animated{
map.mapType = MKMapTypeStandard;
map.showsUserLocation=YES;
NSLog(@"%f%f",self.lat_task,self.long_task);
CLLocationCoordinate2D coord = {.latitude = self.lat_task, .longitude = self.long_task};
MKCoordinateSpan span = {.latitudeDelta = 0.3, .longitudeDelta = 0.3};
MKCoordinateRegion region = {coord, span};
[map setRegion:region];
//map.delegate=self;
MKPlacemark *mPlacemark = [[[MKPlacemark alloc] initWithCoordinate:coord addressDictionary:nil] autorelease];
[map addAnnotation:mPlacemark];
}
No comments:
Post a Comment