diff options
author | Justin R. Miller <incanus@users.noreply.github.com> | 2015-04-08 10:56:53 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@users.noreply.github.com> | 2015-04-08 10:56:53 -0700 |
commit | d1be8ed786da405a891ec755828fdea90126da30 (patch) | |
tree | e8ef23ba4007955576804b03aae4331e6be1062e /ios | |
parent | b47ebba2b902ee77f510b493ff281b609d65bd35 (diff) | |
parent | b2c232a1f7bc0f5577f6ef1777071ea1b836c846 (diff) | |
download | qtlocation-mapboxgl-d1be8ed786da405a891ec755828fdea90126da30.tar.gz |
Merge pull request #1229 from mapbox/update-styles-pin
fixes #1228: bring in Streets & Light & update styles pin
Diffstat (limited to 'ios')
-rw-r--r-- | ios/app/MBXViewController.mm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm index 28ac68589a..d76ca42a39 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]; } |