diff options
author | Andrew Kitchen <andrew.kitchen@mapbox.com> | 2018-01-05 15:22:15 -0800 |
---|---|---|
committer | Andrew Kitchen <akitchen@gmail.com> | 2018-01-19 20:28:57 -0500 |
commit | d0193c5b2b7140f54d6f166fa4e8a711a045915e (patch) | |
tree | 8f07e70edd959793785de3b572bf8a7f7851c655 /platform/ios/app/MBXViewController.m | |
parent | 2c48871c065c6efec42c5660c9560ecdfaa8d359 (diff) | |
download | qtlocation-mapboxgl-d0193c5b2b7140f54d6f166fa4e8a711a045915e.tar.gz |
Restores fix to MGLOpenGLStyleLayer memory-related crash (#10765)
Revert this commit to see integration test fail.
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 |