diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-08-24 11:34:03 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-08-24 11:34:03 -0700 |
commit | 92dd26c8be78b30429e4d38bad3b67b32046ed06 (patch) | |
tree | 4d4cce2b7de8b58d217767239a06923457f100b1 | |
parent | 0451aca37e866c3380072b114e2d49353888e4b5 (diff) | |
download | qtlocation-mapboxgl-92dd26c8be78b30429e4d38bad3b67b32046ed06.tar.gz |
iOS app/framework fixes for v8
- Mapbox Streets -> Streets
- style version from string to integer
- 7 -> 8
-rw-r--r-- | ios/app/MBXViewController.mm | 10 | ||||
-rw-r--r-- | platform/ios/MGLMapView.mm | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm index f5ec262bf4..cf7df0fc3a 100644 --- a/ios/app/MBXViewController.mm +++ b/ios/app/MBXViewController.mm @@ -9,7 +9,7 @@ static UIColor *const kTintColor = [UIColor colorWithRed:0.120 green:0.550 blue:0.670 alpha:1.000]; static NSArray *const kStyleNames = @[ - @"Mapbox Streets", + @"Streets", @"Emerald", @"Light", @"Dark", @@ -19,7 +19,7 @@ static NSArray *const kStyleNames = @[ @"Satellite", ]; -static NSString *const kStyleVersion = @"7"; +static NSUInteger const kStyleVersion = 8; @interface MBXViewController () <UIActionSheetDelegate, MGLMapViewDelegate> @@ -301,9 +301,9 @@ mbgl::Settings_NSUserDefaults *settings = nullptr; } self.mapView.styleURL = [NSURL URLWithString: - [NSString stringWithFormat:@"asset://styles/%@-v%@.json", - [[styleName lowercaseString] stringByReplacingOccurrencesOfString:@" " withString:@"-"], - kStyleVersion]]; + [NSString stringWithFormat:@"asset://styles/%@-v%lu.json", + [styleName lowercaseString], + (unsigned long)kStyleVersion]]; [titleButton setTitle:styleName forState:UIControlStateNormal]; } diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 391763b945..f6f6179341 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -39,11 +39,12 @@ class MBGLView; -NSString *const MGLDefaultStyleName = @"mapbox-streets"; -NSString *const MGLStyleVersion = @"7"; +NSString *const MGLDefaultStyleName = @"streets"; NSString *const MGLDefaultStyleMarkerSymbolName = @"default_marker"; NSString *const MGLMapboxSetupDocumentationURLDisplayString = @"mapbox.com/guides/first-steps-gl-ios"; +NSUInteger const MGLStyleVersion = 8; + const NSTimeInterval MGLAnimationDuration = 0.3; const CGSize MGLAnnotationUpdateViewportOutset = {150, 150}; const CGFloat MGLMinimumZoom = 3; @@ -190,9 +191,9 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) if ( ! styleURL) { - styleURL = MGLURLForBundledStyleNamed([NSString stringWithFormat:@"%@-v%@", + styleURL = MGLURLForBundledStyleNamed([NSString stringWithFormat:@"%@-v%lu", MGLDefaultStyleName.lowercaseString, - MGLStyleVersion]); + (unsigned long)MGLStyleVersion]); } if ( ! [styleURL scheme]) |