ついにキター!!
念願のgoogle map表示
iPhone Application Programming GuideのDisplaying Maps and Annotationsを読んで、下記のように実装しました。
- (void)applicationDidFinishLaunching:(UIApplication *)application { MKMapView *mapview = [[MKMapView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; [window addSubview:mapview]; [window makeKeyAndVisible]; } |
ソースの中身自体はたったの、3行で、できちゃいました。
実行結果はこのような形です。

しかも、ダブルクリックしたら地図がでかくなりました。
(うれしい誤算です。)

この調子で今度は、座標を指定して特定の位置を表示する方法に着手したいと思います。
0 コメント:
コメントを投稿