Last active
August 29, 2015 14:00
-
-
Save Duraiamuthan/11147743 to your computer and use it in GitHub Desktop.
AddAnnotation in Mapview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)MarkMapwithLat:(NSString*)lat withLong:(NSString*)longi | |
{ | |
NSLog(@"Latitude:%@ Longitude:%@",lat,longi); | |
CLLocationCoordinate2D coord=CLLocationCoordinate2DMake(lat.floatValue,longi.floatValue); | |
MKAnnotation *annotation=[[MKAnnotation alloc]initWithCoordinate:coord title:self.Name andsubTitle:customerSnippet]; | |
MKCoordinateRegion viewRegion=MKCoordinateRegionMakeWithDistance(coord,500,500); | |
[mapVu setRegion:viewRegion animated:YES]; | |
[mapVu addAnnotation:annotation]; | |
[mapVu setRegion:viewRegion]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment