Merge pull request #1229 from mapbox/update-styles-pin

fixes #1228: bring in Streets & Light & update styles pin
This commit is contained in:
Justin R. Miller
2015-04-08 10:56:53 -07:00
2 changed files with 8 additions and 3 deletions

View File

@@ -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];
}

2
styles

Submodule styles updated: f9bd84180a...8455ffe52a