summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-04-10 16:34:42 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-04-10 16:34:42 -0700
commit18ef67b002607cf9ff3a343fcc87fcba8a51f388 (patch)
tree43ebb44a46e97498764f2abb70a4d5f190240656
parent53af2bda3f7e7afb6cd7fbc3bc524a4a54c2d171 (diff)
downloadqtlocation-mapboxgl-18ef67b002607cf9ff3a343fcc87fcba8a51f388.tar.gz
Revert "Override file name for Mapbox Streets style JSON"
Mapbox Streets has stock naming again; reverting. Easier to ensure we name properly than build in logic. This reverts commit 0b35a887085cebc4dac99aac6e870504ae24b8e5.
-rw-r--r--ios/app/MBXViewController.mm15
1 files changed, 3 insertions, 12 deletions
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm
index 509cbbb0e6..e677730540 100644
--- a/ios/app/MBXViewController.mm
+++ b/ios/app/MBXViewController.mm
@@ -21,10 +21,6 @@ static NSArray *const kStyleNames = @[
@"Satellite",
];
-static NSDictionary *const kStyleFileNames = @{
- @"Mapbox Streets": @"mapbox-streets",
-};
-
static NSString *const kStyleVersion = @"7";
@interface MBXViewController () <UIActionSheetDelegate, MGLMapViewDelegate>
@@ -251,16 +247,11 @@ mbgl::Settings_NSUserDefaults *settings = nullptr;
if (index == [kStyleNames count]) index = 0;
styleName = [kStyleNames objectAtIndex:index];
}
-
- NSString *styleFileName = kStyleFileNames[styleName];
- if (!styleFileName) {
- styleFileName = [NSString stringWithFormat:@"%@-v%@",
- [styleName.lowercaseString stringByReplacingOccurrencesOfString:@" " withString:@"-"],
- kStyleVersion];
- }
self.mapView.styleURL = [NSURL URLWithString:
- [NSString stringWithFormat:@"asset://styles/%@.json", styleFileName]];
+ [NSString stringWithFormat:@"asset://styles/%@-v%@.json",
+ [[styleName lowercaseString] stringByReplacingOccurrencesOfString:@" " withString:@"-"],
+ kStyleVersion]];
[titleButton setTitle:styleName forState:UIControlStateNormal];
}