Leave a Comment:
29 comments

thanks for the tutorial.
how would you display more than one annotation on a map. if you had a few different locations for example.
Reply
hi Sushant
thanks for the tutorial.
I have done all this stuff regarding corelocation in this way. But unable to do the street view. Can anybody help me how do i implement street view in my app.
Please help me out….
[email protected]

Deze code is voor fulscreen movie!
Stap 1:
Maak een mediaplayer.framework aan
Stap 2:
Zet deze code in je .h view:
UIWindow *window;
-(IBAction)playMovie;
@property (nonatomic, retain) IBOutlet UIWindow *window;
Stap 3:
Zet deze code in je .m view:
#import
-(IBAction)playMovie {
NSString *filepath = [[NSBundle mainBundle] pathForResource:@”Jou movie” ofType:@”Type movie”];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
MPMoviePlayerViewController *moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:fileURL];
[moviePlayerController.moviePlayer play];
[window addSubview:moviePlayerController.view];
}
Ik hoop dat je hier iets aan hebt!
Groetjes Macheo
Reply
Brilliant tutorial,
Its easy and simple helped me alot. in the same code if i want to add multiple pins and annotation any help please. I am stuck.
Reply

hye, thanks for the tutorial.
i have some problem. How i want to add more red pin in different places??
anyone plz help…



Help please, i did everything as it says and get error saying:
receiver ‘DisplayMap’ is a forward class and corresponding @interface may not exist
and wont build :S
Reply
Please checked
#import “MapKitDisplayViewController.h”
#import “DisplayMap.h” //is it import MapKitDisplayViewController.m file?
next checked in DisplayMap.h file
#import // Are you import this in the file?
Just checked and let us know if you have any problem.

Doesn’t work got these messages
DisplayMap *ann = [[DisplayMap alloc] init]; Receiver ‘DisplayMap’ is a forward class and corresponding @interface may not exist.
ann.title = @”Kolkata”; Request for member ‘title’ in something not a structure or union
ann.subtitle = @”Mahatma Gandhi Road”; Request for member ‘subtitle’ in something not a structure or union
ann.coordinate = region.center; Request for member ‘coordinate’ in something not a structure or union
[mapView addAnnotation:ann]; Type ‘DisplayMap *’ does not conform to the MKAnnotation protocol.
I am using sdk 4.0 for iphone
Any suggestions what to do to fix this.
Reply
Please checked
You need to import DisplayMap.h file in the MapKitDisplayViewController.m file. It should be look like below:
#import “MapKitDisplayViewController.h”
#import “DisplayMap.h” //import this file.
If you have still problem then let us know.
Reply
Sorry about the multiple entriies it said invalid security code. Then I imported DisplayMap.h and everything works fine. Thanks gary
Reply
Like most of the samples out there this is a simply a rehash of the Apple sample MapCallouts that show a single annotation, or 2. What is need for real apps is the ability to display multiple annotations from some sort of array or data structure.
Reply
I have this working, thank you. However I now am working on a situation in which I have a tableview. From that I pick a cell and from that window or xib I click on a button and it flips it over to reveal a mapview. This works fine in showing the map, pin, and annotations, but I can’t get it to drop the pin, it is just there. Any suggestions on how to get this to work?
Reply
I have problem with this error.
start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
anyone has idea about this. please help me

how can i add multiple place marks on single map as just example one pin should be dropped at your current location and other pin should be dropped at other location & so on there would be other pins should be dropped by on loading map how can i create that?
Reply


[…] have created map as show on this link and its working […]
Reply
[…] na sdk 4.3 Projekt z tego tutoriala MapKit example in iPhone | iPhone Tutorial | iPhone iOS4 iPad SDK Development & Programming Blog jest napisany pod sdk 4.0, zmieniam na sdk 4.3 w xcodzie i nagle wyskakuje 11 bledow (w przypadku […]
Reply
Use appdelegate string as singleton app.h first pe jaega
@class first;
@interface WOTWAppDelegate : NSObject {
NSString *str1;
}@property ( nonatomic,retain) UINavigationController *nav;
@property ( nonatomic,retain) NSString *str1;
App.m
@synthesize window,nav,str1;
self.viewController = [[[first alloc] initWithNibName:@”first” bundle:nil] autorelease];
self.nav = [[UINavigationController alloc] initWithRootViewController:viewController];
self.window.rootViewController = self.nav;
[self.window makeKeyAndVisible];

-(void)btnClick
{
Gridview * sat = [[Gridview alloc]init];
[self.navigationController pushViewController:sat animated:NO];
}
imagesList = [[NSMutableArray alloc] init];
[imagesList addObject:@”A1.png”];
2nd me
return [imagesList count];
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @”Cell”;
customcell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[customcell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.Img.image=[UIImage imageNamed:[imagesList objectAtIndex:indexPath.row]];
cell.lbl.text = [arryData objectAtIndex:indexPath.row];
cell.sublbl.text = [subtittledata objectAtIndex:indexPath.row];
// Configure the cell…
return cell;
– (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
WOTWAppDelegate *app=[[UIApplication sharedApplication] delegate];
app.str1=[arryData objectAtIndex:indexPath.row] ;
WOTWViewController *st = [[WOTWViewController alloc]init];
[self.navigationController pushViewController:st animated:YES];
}
Reply
-(void)loadPDF
{
WOTWAppDelegate *app=[[UIApplication sharedApplication] delegate];
NSLog(@”namepdf= %@”,app.str1);
if ([str1 isEqualToString:@”A-Family-Man.pdf”])