diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2017-06-13 15:21:50 -0700 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2017-06-13 15:21:50 -0700 |
commit | 04a0c64482c045bd622a8d1c4ad6ca1baace2c34 (patch) | |
tree | 9c978aa3e4850f71fa26fb033f2cb3c81c58b555 /platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m | |
parent | 17ccd0100ceff3ab7d4dd6eb58e3345745dff117 (diff) | |
download | qtlocation-mapboxgl-04a0c64482c045bd622a8d1c4ad6ca1baace2c34.tar.gz |
[ios] added demo projectupstream/jk-nb-pod-try
Diffstat (limited to 'platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m')
-rw-r--r-- | platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m b/platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m new file mode 100644 index 0000000000..9d16978baa --- /dev/null +++ b/platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m @@ -0,0 +1,23 @@ +#import "SimpleMapViewExample.h" +@import Mapbox; + +NSString *const MBXExampleSimpleMapView = @"SimpleMapViewExample"; + +@implementation SimpleMapViewExample + +- (void)viewDidLoad { + [super viewDidLoad]; + + MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds]; + + mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + + // Set the map’s center coordinate and zoom level. + [mapView setCenterCoordinate:CLLocationCoordinate2DMake(59.31, 18.06) + zoomLevel:9 + animated:NO]; + + [self.view addSubview:mapView]; +} + +@end |