summaryrefslogtreecommitdiff
path: root/platform/ios/demo/Examples/ObjectiveC/SatelliteStyleExample.m
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/demo/Examples/ObjectiveC/SatelliteStyleExample.m')
-rw-r--r--platform/ios/demo/Examples/ObjectiveC/SatelliteStyleExample.m28
1 files changed, 28 insertions, 0 deletions
diff --git a/platform/ios/demo/Examples/ObjectiveC/SatelliteStyleExample.m b/platform/ios/demo/Examples/ObjectiveC/SatelliteStyleExample.m
new file mode 100644
index 0000000000..dee1b0ab5d
--- /dev/null
+++ b/platform/ios/demo/Examples/ObjectiveC/SatelliteStyleExample.m
@@ -0,0 +1,28 @@
+#import "SatelliteStyleExample.h"
+@import Mapbox;
+
+NSString *const MBXExampleSatelliteStyle = @"SatelliteStyleExample";
+
+@implementation SatelliteStyleExample
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ // A hybrid style with unobtrusive labels is also available via +satelliteStreetsStyleURLWithVersion:.
+ NSURL *styleURL = [MGLStyle satelliteStyleURLWithVersion:9];
+ MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds styleURL:styleURL];
+
+ // Tint the ℹ️ button.
+ mapView.attributionButton.tintColor = [UIColor whiteColor];
+
+ mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
+
+ // Set the map’s center coordinate and zoom level.
+ [mapView setCenterCoordinate:CLLocationCoordinate2DMake(45.5188, -122.6748)
+ zoomLevel:13
+ animated:NO];
+
+ [self.view addSubview:mapView];
+}
+
+@end