summaryrefslogtreecommitdiff
path: root/platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2017-06-13 15:21:50 -0700
committerjmkiley <jordan.kiley@mapbox.com>2017-06-13 15:21:50 -0700
commit04a0c64482c045bd622a8d1c4ad6ca1baace2c34 (patch)
tree9c978aa3e4850f71fa26fb033f2cb3c81c58b555 /platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m
parent17ccd0100ceff3ab7d4dd6eb58e3345745dff117 (diff)
downloadqtlocation-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.m23
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