From b2c232a1f7bc0f5577f6ef1777071ea1b836c846 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Wed, 8 Apr 2015 10:31:48 -0700 Subject: [PATCH] fixes #1228: bring in Streets & Light & update styles pin --- ios/app/MBXViewController.mm | 9 +++++++-- styles | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm index 28ac68589..d76ca42a3 100644 --- a/ios/app/MBXViewController.mm +++ b/ios/app/MBXViewController.mm @@ -12,6 +12,8 @@ static UIColor *const kTintColor = [UIColor colorWithRed:0.120 green:0.550 blue: static NSArray *const kStyleNames = @[ @"Emerald", + @"Mapbox Streets", + @"Light", @"Bright", @"Basic", @"Outdoors", @@ -79,7 +81,7 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; action:@selector(showSettings)]; UIButton *titleButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [titleButton setFrame:CGRectMake(0, 0, 120, 40)]; + [titleButton setFrame:CGRectMake(0, 0, 150, 40)]; [titleButton setTitle:[kStyleNames firstObject] forState:UIControlStateNormal]; [titleButton setTitleColor:kTintColor forState:UIControlStateNormal]; [titleButton addTarget:self action:@selector(cycleStyles) forControlEvents:UIControlEventTouchUpInside]; @@ -245,7 +247,10 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; styleName = [kStyleNames objectAtIndex:index]; } - self.mapView.styleURL = [NSURL URLWithString:[NSString stringWithFormat:@"asset://styles/%@-v%@.json", styleName.lowercaseString, kStyleVersion]]; + self.mapView.styleURL = [NSURL URLWithString: + [NSString stringWithFormat:@"asset://styles/%@-v%@.json", + [[styleName lowercaseString] stringByReplacingOccurrencesOfString:@" " withString:@"-"], + kStyleVersion]]; [titleButton setTitle:styleName forState:UIControlStateNormal]; } diff --git a/styles b/styles index f9bd84180..8455ffe52 160000 --- a/styles +++ b/styles @@ -1 +1 @@ -Subproject commit f9bd84180aa02069e92e48792b93153786d9f4bc +Subproject commit 8455ffe52a7609280f90cee8bb8673cc2a93d7c4