[ios] explicitly load the style when the app loads

This commit is contained in:
Konstantin Käfer
2016-03-15 11:04:10 +01:00
committed by John Firebaugh
parent 666c2658b8
commit c608803ca9

View File

@@ -54,6 +54,7 @@ static const CLLocationCoordinate2D WorldTourDestinations[] = {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(saveState:) name:UIApplicationWillTerminateNotification object:nil];
self.styleIndex = 0;
self.mapView.styleURL = [NSURL URLWithString:@(mbgl::util::default_styles::orderedStyles[self.styleIndex].url)];
UIButton *titleButton = (UIButton *)self.navigationItem.titleView;
[titleButton setTitle:@(mbgl::util::default_styles::orderedStyles[self.styleIndex].name) forState:UIControlStateNormal];