diff options
Diffstat (limited to 'platform/ios/app/MBXViewController.m')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 2fd2b69e83..4306354030 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1683,11 +1683,8 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { numStyleURLMethods, (unsigned long)styleNames.count); }); - MGLStyle *oldStyle = self.mapView.style; - MGLStyleLayer *oldLayer = [oldStyle layerWithIdentifier:@"test-layer"]; - [oldStyle removeLayer:oldLayer]; - self.styleIndex = (self.styleIndex + 1) % styleNames.count; + self.mapView.styleURL = styleURLs[self.styleIndex]; UIButton *titleButton = (UIButton *)self.navigationItem.titleView; @@ -1934,9 +1931,6 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { // that a device with an English-language locale is already effectively // using locale-based country labels. _usingLocaleBasedCountryLabels = [[self bestLanguageForUser] isEqualToString:@"en"]; - - MGLOpenGLStyleLayer *glLayer = [[MGLOpenGLStyleLayer alloc] initWithIdentifier:@"test-layer"]; - [style addLayer:glLayer]; } - (void)mapViewRegionIsChanging:(MGLMapView *)mapView |