Created
December 19, 2013 13:26
-
-
Save frontconnect/8039047 to your computer and use it in GitHub Desktop.
Create and initialize the GMSMapView programmatically.
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
@interface ViewController () | |
@property (nonatomic) GMSMapView *mapView; | |
@end | |
@implementation ViewController | |
#pragma mark - UIViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:41.0109 longitude:28.998 zoom:6]; | |
CGRect mapSize = CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y, | |
self.view.bounds.size.width/2.0, | |
self.view.bounds.size.height/2.0); | |
self.mapView = [GMSMapView mapWithFrame:mapSize camera:camera]; | |
[self.view addSubview:self.mapView]; | |
} | |
- (void)didReceiveMemoryWarning { | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment