summaryrefslogtreecommitdiff
path: root/platform/ios/demo/Examples/ObjectiveC/SimpleMapViewExample.m
diff options
context:
space:
mode:
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