Display a specific place in iOS Map
Its very simple to display a place (pin) in iOS Map. All you need is to follow 3 simple steps
1. Create an instance of MKPlaceMark with the coordinates and address dictionary
MKPlacemark *placeMark = [[MKPlacemark alloc]initWithCoordinate:coordinate addressDictionary:addressDict];
2. Create an instance of MKMapItem with the PlaceMark
MKMapItem *mapItem = [[MKMapItem alloc] initWithPlacemark:placeMark];
3. Launch the iOS map using its instance method ‘openInMapsWithLaunchOptions:‘ and thats it..
[mapItem openInMapsWithLaunchOptions:nil];
コメント
コメントを投稿