diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2018-12-07 21:46:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-07 21:46:46 -0500 |
commit | 7cdbe6664ac27d7734e50ea6659dbcf021f61916 (patch) | |
tree | 712838bfb8a68f4c729a0e185a6b1cd8cc6e9d40 /platform/ios/app/MBXViewController.m | |
parent | 1b0365429de2175688f496db3b0ac5cdb1439fb6 (diff) | |
download | qtlocation-mapboxgl-7cdbe6664ac27d7734e50ea6659dbcf021f61916.tar.gz |
[ios, macos] Update for streets-v8 data and coalesced name fields in v11 styles
Diffstat (limited to 'platform/ios/app/MBXViewController.m')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 2db2ad10d0..9e6cbf2a8e 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -686,7 +686,7 @@ CLLocationCoordinate2D randomWorldCoordinate() { switch (indexPath.row) { case MBXSettingsMiscellaneousLocalizeLabels: - [self styleCountryLabelsLanguage]; + [self toggleStyleLabelsLanguage]; break; case MBXSettingsMiscellaneousWorldTour: [self startWorldTour]; @@ -1432,7 +1432,7 @@ CLLocationCoordinate2D randomWorldCoordinate() { } } --(void)styleCountryLabelsLanguage +-(void)toggleStyleLabelsLanguage { _localizingLabels = !_localizingLabels; [self.mapView.style localizeLabelsIntoLocale:_localizingLabels ? [NSLocale localeWithLocaleIdentifier:@"mul"] : nil]; @@ -1538,8 +1538,8 @@ CLLocationCoordinate2D randomWorldCoordinate() { - (NSString *)bestLanguageForUser { - // https://www.mapbox.com/vector-tiles/mapbox-streets-v7/#overview - NSArray *supportedLanguages = @[ @"ar", @"en", @"es", @"fr", @"de", @"pt", @"ru", @"zh", @"zh-Hans" ]; + // https://www.mapbox.com/vector-tiles/mapbox-streets-v8/#name-text--name_lang-code-text + NSArray *supportedLanguages = @[ @"ar", @"de", @"en", @"es", @"fr", @"ja", @"ko", @"pt", @"ru", @"zh", @"zh-Hans", @"zh-Hant" ]; NSArray<NSString *> *preferredLanguages = [NSBundle preferredLocalizationsFromArray:supportedLanguages forPreferences:[NSLocale preferredLanguages]]; NSString *mostSpecificLanguage; @@ -1920,7 +1920,6 @@ CLLocationCoordinate2D randomWorldCoordinate() { [MGLStyle darkStyleURL], [MGLStyle satelliteStyleURL], [MGLStyle satelliteStreetsStyleURL] - ]; NSAssert(styleNames.count == styleURLs.count, @"Style names and URLs don’t match."); |