diff --git a/.tx/config b/.tx/config index b464acb01..1de8f7830 100644 --- a/.tx/config +++ b/.tx/config @@ -9,6 +9,13 @@ source_file = platform/darwin/resources/Base.lproj/Foundation.strings source_lang = en type = STRINGS +[mapbox-gl-native.foundationstringsdict-darwin] +file_filter = platform/darwin/resources/.lproj/Foundation.stringsdict +lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant +source_file = platform/darwin/resources/en.lproj/Foundation.stringsdict +source_lang = en +type = STRINGSDICT + [mapbox-gl-native.localizablestrings-ios] file_filter = platform/ios/resources/.lproj/Localizable.strings lang_map = pt_BR: pt-BR, pt_PT: pt-PT, zh_CN: zh-Hans, zh_TW: zh-Hant diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index 716dba18e..8ce8b3d3c 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -23,6 +23,7 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to * Avoid adding duplicate points to bounds [#9955](https://github.com/mapbox/mapbox-gl-native/pull/9955) * Download is complete fix [#9913](https://github.com/mapbox/mapbox-gl-native/pull/9913) * MAS 2.2.3 [#9901](https://github.com/mapbox/mapbox-gl-native/pull/9901) +* Russian and Ukrainian localizations [#9945](https://github.com/mapbox/mapbox-gl-native/pull/9945) ## 5.1.3 - August 18, 2017 diff --git a/platform/android/MapboxGLAndroidSDK/proguard-rules.pro b/platform/android/MapboxGLAndroidSDK/proguard-rules.pro index 68edc12f3..b5a1d82c8 100644 --- a/platform/android/MapboxGLAndroidSDK/proguard-rules.pro +++ b/platform/android/MapboxGLAndroidSDK/proguard-rules.pro @@ -7,4 +7,9 @@ -keep interface com.mapbox.mapboxsdk.** { *; } -keep class com.mapbox.services.android.telemetry.** { *; } -keep class com.mapbox.services.commons.** { *;} --keep class com.google.gson.** { *; } \ No newline at end of file +-keep class com.google.gson.** { *; } + +# config for okhttp 3.8.0, https://github.com/square/okhttp/pull/3354 +-dontwarn okio.** +-dontwarn javax.annotation.Nullable +-dontwarn javax.annotation.ParametersAreNonnullByDefault \ No newline at end of file diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values-ca/strings.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values-ca/strings.xml index 34e9914e4..6ed788d1d 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values-ca/strings.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values-ca/strings.xml @@ -1,14 +1,15 @@ Brúixola del mapa. Activa per restablir la rotació del mapa al Nord. - Icona d\'atribució. Activa per mostrar el diàleg de l\'atribució. + Icona d’atribució. Activa per mostrar el diàleg de l’atribució. Vista de posició. Mostra la teva posició al mapa. - Mostrant un mapa creat amb Mapbox. Desplaça\'t arrossegant amb dos dits. Fes zoom pessigant amb dos dits. + Mostrant un mapa creat amb Mapbox. Desplaça’t arrossegant amb dos dits. Fes zoom pessigant amb dos dits. Mapbox Android SDK Millora els mapes de Mapbox - Estàs ajudant a millorar els mapes d\'OpenStreetMap i de Mapbox aportant dades d\'ús anònimes. - D\'acord + Estàs ajudant a millorar els mapes d’OpenStreetMap i de Mapbox aportant dades d’ús anònimes. + D’acord Disconforme Més informació La OfflineRegionDefinition proporcionada no encaixa amb els límits del món: %s - + + diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values-nl/strings.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values-nl/strings.xml index fef652c54..f1fcf837e 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values-nl/strings.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values-nl/strings.xml @@ -11,4 +11,5 @@ Intrekken Meer informatie Aangeleverde OfflineRegionDefinition past niet in de wereld omtrek: %s - + + diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values-ru/strings.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values-ru/strings.xml new file mode 100644 index 000000000..39880d56b --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values-ru/strings.xml @@ -0,0 +1,15 @@ + + + Компас. Активируйте, чтобы повернуть карту на Север. + Иконка атрибутов. Активируйте, чтобы показать диалог. + Местоположение. Отображает ваше местоположение на карте. + Отображает карту, созданную при помощи Mapbox. Протисните при помощи двух пальцев. Приблизьте, соединением пальцев. + Mapbox Android SDK + Сделать карты Mapbox лучше + Вы помогаете сделать карты OpenStreetMap и Mapbox лучше путем предоставления анонимных данных об использовании. + Согласен + Не согласен + Дополнительная информация + Запрошенный OfflineRegionDefinition не входит в допустимые границы: %s + + diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values-uk/strings.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values-uk/strings.xml new file mode 100644 index 000000000..64c7e3efc --- /dev/null +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values-uk/strings.xml @@ -0,0 +1,15 @@ + + + Компас. Натисніть щоб зорієнтувати мапу на північ. + Значок атрибуції. Натисніть, щоб показати діалог атрибуції. + Визначення положення. Показує ваше місцеположення на мапі. + Показує мапи створені за допомоги Mapbox. Пересувайте мапу двома пальцями. Змінюйте масштаб стуляючи/розводячи два пальці. + Mapbox Android SDK + Допоможіть зробити мапи Mapbox краще + Ви допомагаєте робити мапи OpenStreetMap та Mapbox краще пощирюючи анонімні дані про користування мапами. + Погоджуюсь + Не погоджуюсь + Додаткова інформація + Межі ділянки для оффлайнового користування даними за межами світу: %s + + diff --git a/platform/android/MapboxGLAndroidSDK/src/main/resources/fabric/com.mapbox.mapboxsdk.mapbox-android-sdk.properties b/platform/android/MapboxGLAndroidSDK/src/main/resources/fabric/com.mapbox.mapboxsdk.mapbox-android-sdk.properties index 3cfc7d5fd..716f0ffe7 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/resources/fabric/com.mapbox.mapboxsdk.mapbox-android-sdk.properties +++ b/platform/android/MapboxGLAndroidSDK/src/main/resources/fabric/com.mapbox.mapboxsdk.mapbox-android-sdk.properties @@ -1,3 +1,3 @@ fabric-identifier=com.mapbox.mapboxsdk.mapbox-android-sdk -fabric-version=5.1.2 +fabric-version=5.1.4 fabric-build-type=binary diff --git a/platform/darwin/resources/ca.lproj/Foundation.strings b/platform/darwin/resources/ca.lproj/Foundation.strings index e36ea9ed8..f86442f26 100644 --- a/platform/darwin/resources/ca.lproj/Foundation.strings +++ b/platform/darwin/resources/ca.lproj/Foundation.strings @@ -1,8 +1,8 @@ /* Clock position format, long: {hours} o’clock */ -"CLOCK_FMT_LONG" = "%@ en punt"; +"CLOCK_FMT_LONG" = "a les %@"; /* Clock position format, medium: {hours} o’clock */ -"CLOCK_FMT_MEDIUM" = "%@ en punt"; +"CLOCK_FMT_MEDIUM" = "a les %@"; /* Clock position format, short: {hours}:00 */ "CLOCK_FMT_SHORT" = "%@:00"; diff --git a/platform/darwin/resources/de.lproj/Foundation.stringsdict b/platform/darwin/resources/de.lproj/Foundation.stringsdict index 776528a99..fb9073fa9 100644 --- a/platform/darwin/resources/de.lproj/Foundation.stringsdict +++ b/platform/darwin/resources/de.lproj/Foundation.stringsdict @@ -2,6 +2,22 @@ + COORD_DEG_LONG + + NSStringLocalizedFormatKey + %#@degrees@ + degrees + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d Grad + other + %d Grad + + COORD_MIN_LONG NSStringLocalizedFormatKey diff --git a/platform/darwin/resources/lt.lproj/Foundation.stringsdict b/platform/darwin/resources/lt.lproj/Foundation.stringsdict index e3bb31838..4ab9d4a8b 100644 --- a/platform/darwin/resources/lt.lproj/Foundation.stringsdict +++ b/platform/darwin/resources/lt.lproj/Foundation.stringsdict @@ -16,8 +16,6 @@ %d laipsniai few %d laipsniai - many - %d laipsniai other %d laipsnių @@ -36,8 +34,6 @@ %d minutė few %d minutės - many - %d minutės other %d minučių @@ -56,8 +52,6 @@ %d sekundė few %d sekundės - many - %d sekundės other %d sekundžių diff --git a/platform/darwin/resources/ru.lproj/Foundation.strings b/platform/darwin/resources/ru.lproj/Foundation.strings new file mode 100644 index 000000000..fd9eb04ad --- /dev/null +++ b/platform/darwin/resources/ru.lproj/Foundation.strings @@ -0,0 +1,291 @@ +/* Clock position format, long: {hours} o’clock */ +"CLOCK_FMT_LONG" = "%@ часов"; + +/* Clock position format, medium: {hours} o’clock */ +"CLOCK_FMT_MEDIUM" = "%@ час."; + +/* Clock position format, short: {hours}:00 */ +"CLOCK_FMT_SHORT" = "%@:00"; + +/* East, long */ +"COMPASS_E_LONG" = "восток"; + +/* East, short */ +"COMPASS_E_SHORT" = "В"; + +/* East by north, long */ +"COMPASS_EbN_LONG" = "северо-восток"; + +/* East by north, short */ +"COMPASS_EbN_SHORT" = "СВ"; + +/* East by south, long */ +"COMPASS_EbS_LONG" = "юго-восток"; + +/* East by south, short */ +"COMPASS_EbS_SHORT" = "ЮВ"; + +/* East-northeast, long */ +"COMPASS_ENE_LONG" = "восток-северо-восток"; + +/* East-northeast, short */ +"COMPASS_ENE_SHORT" = "ВСВ"; + +/* East-southeast, long */ +"COMPASS_ESE_LONG" = "юго-юго-восток"; + +/* East-southeast, short */ +"COMPASS_ESE_SHORT" = "ЮЮВ"; + +/* North, long */ +"COMPASS_N_LONG" = "север"; + +/* North, short */ +"COMPASS_N_SHORT" = "С"; + +/* North by east, long */ +"COMPASS_NbE_LONG" = "северо-восток"; + +/* North by east, short */ +"COMPASS_NbE_SHORT" = "СВ"; + +/* North by west, long */ +"COMPASS_NbW_LONG" = "северо-запад"; + +/* North by west, short */ +"COMPASS_NbW_SHORT" = "СЗ"; + +/* Northeast, long */ +"COMPASS_NE_LONG" = "северо-восток"; + +/* Northeast, short */ +"COMPASS_NE_SHORT" = "СВ"; + +/* Northeast by east, long */ +"COMPASS_NEbE_LONG" = "восток-северо-восток"; + +/* Northeast by east, short */ +"COMPASS_NEbE_SHORT" = "ВСВ"; + +/* Northeast by north, long */ +"COMPASS_NEbN_LONG" = "северо-северо-восток"; + +/* Northeast by north, short */ +"COMPASS_NEbN_SHORT" = "ССВ"; + +/* North-northeast, long */ +"COMPASS_NNE_LONG" = "северо-северо-восток"; + +/* North-northeast, short */ +"COMPASS_NNE_SHORT" = "ССВ"; + +/* North-northwest, long */ +"COMPASS_NNW_LONG" = "северо-северо-запад"; + +/* North-northwest, short */ +"COMPASS_NNW_SHORT" = "ССЗ"; + +/* Northwest, long */ +"COMPASS_NW_LONG" = "северо-запад"; + +/* Northwest, short */ +"COMPASS_NW_SHORT" = "СЗ"; + +/* Northwest by north, long */ +"COMPASS_NWbN_LONG" = "северо-северо-запад"; + +/* Northwest by north, short */ +"COMPASS_NWbN_SHORT" = "ССЗ"; + +/* Northwest by west, long */ +"COMPASS_NWbW_LONG" = "запад-северо-запад"; + +/* Northwest by west, short */ +"COMPASS_NWbW_SHORT" = "ЗСЗ"; + +/* South, long */ +"COMPASS_S_LONG" = "юг"; + +/* South, short */ +"COMPASS_S_SHORT" = "Ю"; + +/* South by east, long */ +"COMPASS_SbE_LONG" = "юго-восток"; + +/* South by east, short */ +"COMPASS_SbE_SHORT" = "ЮВ"; + +/* South by west, long */ +"COMPASS_SbW_LONG" = "юго-запад"; + +/* South by west, short */ +"COMPASS_SbW_SHORT" = "ЮЗ"; + +/* Southeast, long */ +"COMPASS_SE_LONG" = "юго-восток"; + +/* Southeast, short */ +"COMPASS_SE_SHORT" = "ЮВ"; + +/* Southeast by east, long */ +"COMPASS_SEbE_LONG" = "восток-юго-восток"; + +/* Southeast by east, short */ +"COMPASS_SEbE_SHORT" = "ВЮВ"; + +/* Southeast by south, long */ +"COMPASS_SEbS_LONG" = "юго-юго-восток"; + +/* Southeast by south, short */ +"COMPASS_SEbS_SHORT" = "ЮЮВ"; + +/* South-southeast, long */ +"COMPASS_SSE_LONG" = "юго-юго-восток"; + +/* South-southeast, short */ +"COMPASS_SSE_SHORT" = "ЮЮВ"; + +/* South-southwest, long */ +"COMPASS_SSW_LONG" = "юго-юго-запад"; + +/* South-southwest, short */ +"COMPASS_SSW_SHORT" = "ЮЮЗ"; + +/* Southwest, long */ +"COMPASS_SW_LONG" = "юго-запад"; + +/* Southwest, short */ +"COMPASS_SW_SHORT" = "ЮЗ"; + +/* Southwest by south, long */ +"COMPASS_SWbS_LONG" = "юго-юго-запад"; + +/* Southwest by south, short */ +"COMPASS_SWbS_SHORT" = "ЮЮЗ"; + +/* Southwest by west, long */ +"COMPASS_SWbW_LONG" = "восток-юго-восток"; + +/* Southwest by west, short */ +"COMPASS_SWbW_SHORT" = "ВЮВ"; + +/* West, long */ +"COMPASS_W_LONG" = "запад"; + +/* West, short */ +"COMPASS_W_SHORT" = "З"; + +/* West by north, long */ +"COMPASS_WbN_LONG" = "северо-запад"; + +/* West by north, short */ +"COMPASS_WbN_SHORT" = "СЗ"; + +/* West by south, long */ +"COMPASS_WbS_LONG" = "юго-запад"; + +/* West by south, short */ +"COMPASS_WbS_SHORT" = "ЮГ"; + +/* West-northwest, long */ +"COMPASS_WNW_LONG" = "запад-северо-запад"; + +/* West-northwest, short */ +"COMPASS_WNW_SHORT" = "ЗСЗ"; + +/* West-southwest, long */ +"COMPASS_WSW_LONG" = "запад-юго-запад"; + +/* West-southwest, short */ +"COMPASS_WSW_SHORT" = "ЗЮЗ"; + +/* Degrees format, long */ +"COORD_DEG_LONG" = "%d градус(ов)"; + +/* Degrees format, medium: {degrees} */ +"COORD_DEG_MEDIUM" = "%d°"; + +/* Degrees format, short: {degrees} */ +"COORD_DEG_SHORT" = "%d°"; + +/* Coordinate format, long: {degrees}{minutes} */ +"COORD_DM_LONG" = "%1$@ и %2$@"; + +/* Coordinate format, medium: {degrees}{minutes} */ +"COORD_DM_MEDIUM" = "%1$@%2$@"; + +/* Coordinate format, short: {degrees}{minutes} */ +"COORD_DM_SHORT" = "%1$@%2$@"; + +/* Coordinate format, long: {degrees}{minutes}{seconds} */ +"COORD_DMS_LONG" = "%1$@, %2$@, и %3$@"; + +/* Coordinate format, medium: {degrees}{minutes}{seconds} */ +"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@"; + +/* Coordinate format, short: {degrees}{minutes}{seconds} */ +"COORD_DMS_SHORT" = "%1$@%2$@%3$@"; + +/* East longitude format, long: {longitude} */ +"COORD_E_LONG" = "%@восточной долготы"; + +/* East longitude format, medium: {longitude} */ +"COORD_E_MEDIUM" = "%@восточной долготы"; + +/* East longitude format, short: {longitude} */ +"COORD_E_SHORT" = "%@E"; + +/* Coordinate pair format, long: {latitude}, {longitude} */ +"COORD_FMT_LONG" = "%1$@,%2$@"; + +/* Coordinate pair format, medium: {latitude}, {longitude} */ +"COORD_FMT_MEDIUM" = "%1$@, %2$@"; + +/* Coordinate pair format, short: {latitude}, {longitude} */ +"COORD_FMT_SHORT" = "%1$@, %2$@"; + +/* Minutes format, long */ +"COORD_MIN_LONG" = "%d минут(а)"; + +/* Minutes format, medium: {minutes} */ +"COORD_MIN_MEDIUM" = "%d′"; + +/* Minutes format, short: {minutes} */ +"COORD_MIN_SHORT" = "%d′"; + +/* North latitude format, long: {latitude} */ +"COORD_N_LONG" = "%@северной широты"; + +/* North latitude format, medium: {latitude} */ +"COORD_N_MEDIUM" = "%@северной широты"; + +/* North latitude format, short: {latitude} */ +"COORD_N_SHORT" = "%@N"; + +/* South latitude format, long: {latitude} */ +"COORD_S_LONG" = "%@южной широты"; + +/* South latitude format, medium: {latitude} */ +"COORD_S_MEDIUM" = "%@южной широты"; + +/* South latitude format, short: {latitude} */ +"COORD_S_SHORT" = "%@S"; + +/* Seconds format, long */ +"COORD_SEC_LONG" = "%d секунд(а)"; + +/* Seconds format, medium: {seconds} */ +"COORD_SEC_MEDIUM" = "%d″"; + +/* Seconds format, short: {seconds} */ +"COORD_SEC_SHORT" = "%d″"; + +/* West longitude format, long: {longitude} */ +"COORD_W_LONG" = "%@западной долготы"; + +/* West longitude format, medium: {longitude} */ +"COORD_W_MEDIUM" = "%@западной долготы"; + +/* West longitude format, short: {longitude} */ +"COORD_W_SHORT" = "%@W"; + diff --git a/platform/darwin/resources/uk.lproj/Foundation.strings b/platform/darwin/resources/uk.lproj/Foundation.strings new file mode 100644 index 000000000..32a006829 --- /dev/null +++ b/platform/darwin/resources/uk.lproj/Foundation.strings @@ -0,0 +1,291 @@ +/* Clock position format, long: {hours} o’clock */ +"CLOCK_FMT_LONG" = "%@год."; + +/* Clock position format, medium: {hours} o’clock */ +"CLOCK_FMT_MEDIUM" = "%@г."; + +/* Clock position format, short: {hours}:00 */ +"CLOCK_FMT_SHORT" = "%@:00"; + +/* East, long */ +"COMPASS_E_LONG" = "схід"; + +/* East, short */ +"COMPASS_E_SHORT" = "Сх"; + +/* East by north, long */ +"COMPASS_EbN_LONG" = "північний схід"; + +/* East by north, short */ +"COMPASS_EbN_SHORT" = "ПнСх"; + +/* East by south, long */ +"COMPASS_EbS_LONG" = "південний схід"; + +/* East by south, short */ +"COMPASS_EbS_SHORT" = "ПдСх"; + +/* East-northeast, long */ +"COMPASS_ENE_LONG" = "схід - північний схід"; + +/* East-northeast, short */ +"COMPASS_ENE_SHORT" = "Сх-ПнСх"; + +/* East-southeast, long */ +"COMPASS_ESE_LONG" = "схід - південний схід"; + +/* East-southeast, short */ +"COMPASS_ESE_SHORT" = "Сх-ПдСх"; + +/* North, long */ +"COMPASS_N_LONG" = "північ"; + +/* North, short */ +"COMPASS_N_SHORT" = "Пн"; + +/* North by east, long */ +"COMPASS_NbE_LONG" = "північний схід"; + +/* North by east, short */ +"COMPASS_NbE_SHORT" = "ПнСх"; + +/* North by west, long */ +"COMPASS_NbW_LONG" = "північний захід"; + +/* North by west, short */ +"COMPASS_NbW_SHORT" = "ПнЗх"; + +/* Northeast, long */ +"COMPASS_NE_LONG" = "північний схід"; + +/* Northeast, short */ +"COMPASS_NE_SHORT" = "ПнСх"; + +/* Northeast by east, long */ +"COMPASS_NEbE_LONG" = "північний схід - схід"; + +/* Northeast by east, short */ +"COMPASS_NEbE_SHORT" = "ПнСх-Сх"; + +/* Northeast by north, long */ +"COMPASS_NEbN_LONG" = "північний счхід - північ"; + +/* Northeast by north, short */ +"COMPASS_NEbN_SHORT" = "ПнСх-Пн"; + +/* North-northeast, long */ +"COMPASS_NNE_LONG" = "північ - північний схід"; + +/* North-northeast, short */ +"COMPASS_NNE_SHORT" = "Пн-ПнСх"; + +/* North-northwest, long */ +"COMPASS_NNW_LONG" = "північ - північний захід"; + +/* North-northwest, short */ +"COMPASS_NNW_SHORT" = "Пн-ПнЗх"; + +/* Northwest, long */ +"COMPASS_NW_LONG" = "північний захід"; + +/* Northwest, short */ +"COMPASS_NW_SHORT" = "ПнЗх"; + +/* Northwest by north, long */ +"COMPASS_NWbN_LONG" = "північний захід - північ"; + +/* Northwest by north, short */ +"COMPASS_NWbN_SHORT" = "ПнЗх-Пн"; + +/* Northwest by west, long */ +"COMPASS_NWbW_LONG" = "північний захід - захід"; + +/* Northwest by west, short */ +"COMPASS_NWbW_SHORT" = "ПнЗх-Зх"; + +/* South, long */ +"COMPASS_S_LONG" = "південь"; + +/* South, short */ +"COMPASS_S_SHORT" = "Пд"; + +/* South by east, long */ +"COMPASS_SbE_LONG" = "південний схід"; + +/* South by east, short */ +"COMPASS_SbE_SHORT" = "ПдСх"; + +/* South by west, long */ +"COMPASS_SbW_LONG" = "південний захід"; + +/* South by west, short */ +"COMPASS_SbW_SHORT" = "ПдЗх"; + +/* Southeast, long */ +"COMPASS_SE_LONG" = "південний схід"; + +/* Southeast, short */ +"COMPASS_SE_SHORT" = "ПдСх"; + +/* Southeast by east, long */ +"COMPASS_SEbE_LONG" = "південний схід - схід"; + +/* Southeast by east, short */ +"COMPASS_SEbE_SHORT" = "ПдСх-Сх"; + +/* Southeast by south, long */ +"COMPASS_SEbS_LONG" = "південний схід - південь"; + +/* Southeast by south, short */ +"COMPASS_SEbS_SHORT" = "ПдСх-Пд"; + +/* South-southeast, long */ +"COMPASS_SSE_LONG" = "південь - південний схід"; + +/* South-southeast, short */ +"COMPASS_SSE_SHORT" = "Пд-ПдСх"; + +/* South-southwest, long */ +"COMPASS_SSW_LONG" = "південь - південний захід"; + +/* South-southwest, short */ +"COMPASS_SSW_SHORT" = "Пд-ПдЗх"; + +/* Southwest, long */ +"COMPASS_SW_LONG" = "південний захід"; + +/* Southwest, short */ +"COMPASS_SW_SHORT" = "ПдЗх"; + +/* Southwest by south, long */ +"COMPASS_SWbS_LONG" = "південний захід - південь"; + +/* Southwest by south, short */ +"COMPASS_SWbS_SHORT" = "ПдЗх-Пд"; + +/* Southwest by west, long */ +"COMPASS_SWbW_LONG" = "південний захід - захід"; + +/* Southwest by west, short */ +"COMPASS_SWbW_SHORT" = "ПдЗх-Зх"; + +/* West, long */ +"COMPASS_W_LONG" = "захід"; + +/* West, short */ +"COMPASS_W_SHORT" = "Зх"; + +/* West by north, long */ +"COMPASS_WbN_LONG" = "північний захід"; + +/* West by north, short */ +"COMPASS_WbN_SHORT" = "ПнЗх"; + +/* West by south, long */ +"COMPASS_WbS_LONG" = "південний захід"; + +/* West by south, short */ +"COMPASS_WbS_SHORT" = "ПдЗх"; + +/* West-northwest, long */ +"COMPASS_WNW_LONG" = "захід - північний захід"; + +/* West-northwest, short */ +"COMPASS_WNW_SHORT" = "Зх-ПнЗх"; + +/* West-southwest, long */ +"COMPASS_WSW_LONG" = "захід - південний захід"; + +/* West-southwest, short */ +"COMPASS_WSW_SHORT" = "Зх-ПдЗх"; + +/* Degrees format, long */ +"COORD_DEG_LONG" = "%d градус(ів)"; + +/* Degrees format, medium: {degrees} */ +"COORD_DEG_MEDIUM" = "%d°"; + +/* Degrees format, short: {degrees} */ +"COORD_DEG_SHORT" = "%d°"; + +/* Coordinate format, long: {degrees}{minutes} */ +"COORD_DM_LONG" = "%1$@ та %2$@"; + +/* Coordinate format, medium: {degrees}{minutes} */ +"COORD_DM_MEDIUM" = "%1$@%2$@"; + +/* Coordinate format, short: {degrees}{minutes} */ +"COORD_DM_SHORT" = "%1$@%2$@"; + +/* Coordinate format, long: {degrees}{minutes}{seconds} */ +"COORD_DMS_LONG" = "%1$@, %2$@, та %3$@"; + +/* Coordinate format, medium: {degrees}{minutes}{seconds} */ +"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@"; + +/* Coordinate format, short: {degrees}{minutes}{seconds} */ +"COORD_DMS_SHORT" = "%1$@%2$@%3$@"; + +/* East longitude format, long: {longitude} */ +"COORD_E_LONG" = "%@ східної довготи"; + +/* East longitude format, medium: {longitude} */ +"COORD_E_MEDIUM" = "%@ східної довготи"; + +/* East longitude format, short: {longitude} */ +"COORD_E_SHORT" = "%@Сх"; + +/* Coordinate pair format, long: {latitude}, {longitude} */ +"COORD_FMT_LONG" = "%1$@, %2$@"; + +/* Coordinate pair format, medium: {latitude}, {longitude} */ +"COORD_FMT_MEDIUM" = "%1$@, %2$@"; + +/* Coordinate pair format, short: {latitude}, {longitude} */ +"COORD_FMT_SHORT" = "%1$@, %2$@"; + +/* Minutes format, long */ +"COORD_MIN_LONG" = "%d хвилин(а)"; + +/* Minutes format, medium: {minutes} */ +"COORD_MIN_MEDIUM" = "%d′"; + +/* Minutes format, short: {minutes} */ +"COORD_MIN_SHORT" = "%d′"; + +/* North latitude format, long: {latitude} */ +"COORD_N_LONG" = "%@ північної широти"; + +/* North latitude format, medium: {latitude} */ +"COORD_N_MEDIUM" = "%@ північної широти"; + +/* North latitude format, short: {latitude} */ +"COORD_N_SHORT" = "%@Пн"; + +/* South latitude format, long: {latitude} */ +"COORD_S_LONG" = "%@ південної широти"; + +/* South latitude format, medium: {latitude} */ +"COORD_S_MEDIUM" = "%@ південної широти"; + +/* South latitude format, short: {latitude} */ +"COORD_S_SHORT" = "%@Пд"; + +/* Seconds format, long */ +"COORD_SEC_LONG" = "%d секунд(а)"; + +/* Seconds format, medium: {seconds} */ +"COORD_SEC_MEDIUM" = "%d″"; + +/* Seconds format, short: {seconds} */ +"COORD_SEC_SHORT" = "%d″"; + +/* West longitude format, long: {longitude} */ +"COORD_W_LONG" = "%@ західної довготи"; + +/* West longitude format, medium: {longitude} */ +"COORD_W_MEDIUM" = "%@ західної довготи"; + +/* West longitude format, short: {longitude} */ +"COORD_W_SHORT" = "%@Зх"; + diff --git a/platform/darwin/resources/uk.lproj/Foundation.stringsdict b/platform/darwin/resources/uk.lproj/Foundation.stringsdict index f35f0516e..fdad193d4 100644 --- a/platform/darwin/resources/uk.lproj/Foundation.stringsdict +++ b/platform/darwin/resources/uk.lproj/Foundation.stringsdict @@ -16,10 +16,8 @@ %d градус few %d градуси - many - %d градусів other - %d градуса + %d градусів COORD_MIN_LONG @@ -33,13 +31,11 @@ NSStringFormatValueTypeKey d one - %d мінута + %d хвилина few - %d мінути - many - %d мінут + %d хвилини other - %d мінути + %d хвилин COORD_SEC_LONG @@ -56,10 +52,8 @@ %d секунда few %d секунди - many - %d секунд other - %d секунди + %d секунд diff --git a/platform/darwin/resources/vi.lproj/Foundation.stringsdict b/platform/darwin/resources/vi.lproj/Foundation.stringsdict new file mode 100644 index 000000000..d85707f7f --- /dev/null +++ b/platform/darwin/resources/vi.lproj/Foundation.stringsdict @@ -0,0 +1,48 @@ + + + + + COORD_DEG_LONG + + NSStringLocalizedFormatKey + %#@degrees@ + degrees + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + other + %d độ + + + COORD_MIN_LONG + + NSStringLocalizedFormatKey + %#@minutes@ + minutes + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + other + %d phút + + + COORD_SEC_LONG + + NSStringLocalizedFormatKey + %#@seconds@ + seconds + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + other + %d giây + + + + diff --git a/platform/darwin/resources/zh-Hant.lproj/Foundation.strings b/platform/darwin/resources/zh-Hant.lproj/Foundation.strings index 41b1d2baa..8a02bcfac 100644 --- a/platform/darwin/resources/zh-Hant.lproj/Foundation.strings +++ b/platform/darwin/resources/zh-Hant.lproj/Foundation.strings @@ -1,4 +1,4 @@ -/* Clock position format, long: {hours} o’clock */ +/* Clock position format, long: {hours} o’clock */ "CLOCK_FMT_LONG" = "%@點"; /* Clock position format, medium: {hours} o’clock */ @@ -26,16 +26,16 @@ "COMPASS_EbS_SHORT" = "東微南"; /* East-northeast, long */ -"COMPASS_ENE_LONG" = "東北偏東"; +"COMPASS_ENE_LONG" = "東北東"; /* East-northeast, short */ -"COMPASS_ENE_SHORT" = "東北偏東"; +"COMPASS_ENE_SHORT" = "東北東"; /* East-southeast, long */ -"COMPASS_ESE_LONG" = "東南偏東"; +"COMPASS_ESE_LONG" = "東南東"; /* East-southeast, short */ -"COMPASS_ESE_SHORT" = "東南偏東"; +"COMPASS_ESE_SHORT" = "東南東"; /* North, long */ "COMPASS_N_LONG" = "北"; @@ -74,16 +74,16 @@ "COMPASS_NEbN_SHORT" = "東北微北"; /* North-northeast, long */ -"COMPASS_NNE_LONG" = "東北偏北"; +"COMPASS_NNE_LONG" = "北北東"; /* North-northeast, short */ -"COMPASS_NNE_SHORT" = "東北偏北"; +"COMPASS_NNE_SHORT" = "北北東"; /* North-northwest, long */ -"COMPASS_NNW_LONG" = "西北偏北"; +"COMPASS_NNW_LONG" = "北北西"; /* North-northwest, short */ -"COMPASS_NNW_SHORT" = "西北偏北"; +"COMPASS_NNW_SHORT" = "北北西"; /* Northwest, long */ "COMPASS_NW_LONG" = "西北"; @@ -140,16 +140,16 @@ "COMPASS_SEbS_SHORT" = "東南微南"; /* South-southeast, long */ -"COMPASS_SSE_LONG" = "東南偏南"; +"COMPASS_SSE_LONG" = "南南東"; /* South-southeast, short */ -"COMPASS_SSE_SHORT" = "東南偏南"; +"COMPASS_SSE_SHORT" = "南南東"; /* South-southwest, long */ -"COMPASS_SSW_LONG" = "西南偏南"; +"COMPASS_SSW_LONG" = "南南西"; /* South-southwest, short */ -"COMPASS_SSW_SHORT" = "西南偏南"; +"COMPASS_SSW_SHORT" = "南南西"; /* Southwest, long */ "COMPASS_SW_LONG" = "西南"; @@ -158,16 +158,16 @@ "COMPASS_SW_SHORT" = "西南"; /* Southwest by south, long */ -"COMPASS_SWbS_LONG" = "西南偏南"; +"COMPASS_SWbS_LONG" = "西南微南"; /* Southwest by south, short */ -"COMPASS_SWbS_SHORT" = "西南偏南"; +"COMPASS_SWbS_SHORT" = "西南微南"; /* Southwest by west, long */ -"COMPASS_SWbW_LONG" = "西南偏西"; +"COMPASS_SWbW_LONG" = "西南微西"; /* Southwest by west, short */ -"COMPASS_SWbW_SHORT" = "西南偏西"; +"COMPASS_SWbW_SHORT" = "西南微西"; /* West, long */ "COMPASS_W_LONG" = "西"; @@ -188,16 +188,16 @@ "COMPASS_WbS_SHORT" = "西微南"; /* West-northwest, long */ -"COMPASS_WNW_LONG" = "西北偏西"; +"COMPASS_WNW_LONG" = "西北西"; /* West-northwest, short */ -"COMPASS_WNW_SHORT" = "西北偏西"; +"COMPASS_WNW_SHORT" = "西北西"; /* West-southwest, long */ -"COMPASS_WSW_LONG" = "西南偏西"; +"COMPASS_WSW_LONG" = "西南西"; /* West-southwest, short */ -"COMPASS_WSW_SHORT" = "西南偏西"; +"COMPASS_WSW_SHORT" = "西南西"; /* Degrees format, long */ "COORD_DEG_LONG" = "%d度"; diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h index 98be70be9..0b360de8f 100644 --- a/platform/darwin/src/MGLStyle.h +++ b/platform/darwin/src/MGLStyle.h @@ -233,66 +233,38 @@ MGL_EXPORT + (NSURL *)satelliteStreetsStyleURLWithVersion:(NSInteger)version; /** - Returns the URL to the current version of the + Returns the URL to version 2 of the Mapbox Traffic Day style. - Traffic Day color-codes roads based on live traffic congestion data. Traffic - data is currently available in - these select countries. - - @warning The return value may change in a future release of the SDK. If you use - any feature that depends on a specific aspect of a default style – for - instance, the minimum zoom level that includes roads – use the - `-trafficDayStyleURLWithVersion:` method instead. Such details may change - significantly from version to version. */ -+ (NSURL *)trafficDayStyleURL; ++ (NSURL *)trafficDayStyleURL __attribute__((deprecated("Create an NSURL object with the string “mapbox://styles/mapbox/traffic-day-v2”."))); /** Returns the URL to the given version of the Mapbox Traffic Day style as of publication. - - Traffic Day color-codes roads based on live traffic congestion data. Traffic - data is currently available in - these select countries. - + @param version A specific version of the style. */ -+ (NSURL *)trafficDayStyleURLWithVersion:(NSInteger)version; ++ (NSURL *)trafficDayStyleURLWithVersion:(NSInteger)version __attribute__((deprecated("Create an NSURL object with the string “mapbox://styles/mapbox/traffic-day-v2”.")));; /** - Returns the URL to the current version of the + Returns the URL to the version 2 of the Mapbox Traffic Night style. - Traffic Night color-codes roads based on live traffic congestion data and is - designed to maximize legibility in low-light situations. Traffic data is - currently available in - these select countries. - - @warning The return value may change in a future release of the SDK. If you use - any feature that depends on a specific aspect of a default style – for - instance, the minimum zoom level that includes roads – use the - `-trafficNightStyleURLWithVersion:` method instead. Such details may change - significantly from version to version. */ -+ (NSURL *)trafficNightStyleURL; ++ (NSURL *)trafficNightStyleURL __attribute__((deprecated("Create an NSURL object with the string “mapbox://styles/mapbox/traffic-night-v2”."))); /** - Returns the URL to the given version of the + Returns the URL to to the version 2 of the Mapbox Traffic Night style as of publication. - - Traffic Night color-codes roads based on live traffic congestion data and is - designed to maximize legibility in low-light situations. Traffic data is - currently available in - these select countries. - + @param version A specific version of the style. */ -+ (NSURL *)trafficNightStyleURLWithVersion:(NSInteger)version; ++ (NSURL *)trafficNightStyleURLWithVersion:(NSInteger)version __attribute__((deprecated("Create an NSURL object with the string “mapbox://styles/mapbox/traffic-night-v2”."))); #pragma mark Accessing Metadata About the Style diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm index 94f199fd2..52efc7a85 100644 --- a/platform/darwin/src/MGLStyle.mm +++ b/platform/darwin/src/MGLStyle.mm @@ -108,8 +108,6 @@ MGL_DEFINE_STYLE(light, light) MGL_DEFINE_STYLE(dark, dark) MGL_DEFINE_STYLE(satellite, satellite) MGL_DEFINE_STYLE(satelliteStreets, satellite-streets) -MGL_DEFINE_STYLE(trafficDay, traffic-day) -MGL_DEFINE_STYLE(trafficNight, traffic-night) // Make sure all the styles listed in mbgl::util::default_styles::orderedStyles // are defined above and also declared in MGLStyle.h. @@ -136,6 +134,35 @@ static NSURL *MGLStyleURL_emerald; return MGLStyleURL_emerald; } +// Traffic Day is no longer getting new versions as a default style, so the current version is hard-coded here. +static NSURL *MGLStyleURL_trafficDay; ++ (NSURL *)trafficDayStyleURL { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + MGLStyleURL_trafficDay = [NSURL URLWithString:@"mapbox://styles/mapbox/traffic-day-v2"]; + }); + return MGLStyleURL_trafficDay; +} + ++ (NSURL *)trafficDayStyleURLWithVersion:(NSInteger)version { + return [NSURL URLWithString:[@"mapbox://styles/mapbox/traffic-day-v" stringByAppendingFormat:@"%li", (long)version]]; +} + +// Traffic Night is no longer getting new versions as a default style, so the current version is hard-coded here. +static NSURL *MGLStyleURL_trafficNight; ++ (NSURL *)trafficNightStyleURL { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + MGLStyleURL_trafficNight = [NSURL URLWithString:@"mapbox://styles/mapbox/traffic-night-v2"]; + }); + return MGLStyleURL_trafficNight; +} + ++ (NSURL *)trafficNightStyleURLWithVersion:(NSInteger)version { + return [NSURL URLWithString:[@"mapbox://styles/mapbox/traffic-night-v" stringByAppendingFormat:@"%li", (long)version]]; +} + + #pragma mark - - (instancetype)initWithRawStyle:(mbgl::style::Style *)rawStyle mapView:(MGLMapView *)mapView { diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm index 608cfdfd2..8f610e338 100644 --- a/platform/darwin/test/MGLStyleTests.mm +++ b/platform/darwin/test/MGLStyleTests.mm @@ -99,6 +99,8 @@ @(mbgl::util::default_styles::satelliteStreets.url)); XCTAssertEqualObjects([MGLStyle satelliteStreetsStyleURLWithVersion:99].absoluteString, @"mapbox://styles/mapbox/satellite-streets-v99"); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" XCTAssertEqualObjects([MGLStyle trafficDayStyleURLWithVersion:mbgl::util::default_styles::trafficDay.currentVersion].absoluteString, @(mbgl::util::default_styles::trafficDay.url)); XCTAssertEqualObjects([MGLStyle trafficDayStyleURLWithVersion:99].absoluteString, @@ -107,6 +109,7 @@ @(mbgl::util::default_styles::trafficNight.url)); XCTAssertEqualObjects([MGLStyle trafficNightStyleURLWithVersion:99].absoluteString, @"mapbox://styles/mapbox/traffic-night-v99"); +#pragma clang diagnostic pop static_assert(8 == mbgl::util::default_styles::numOrderedStyles, "MGLStyleTests isn’t testing all the styles in mbgl::util::default_styles."); @@ -140,7 +143,7 @@ NSString *styleHeader = self.stringWithContentsOfStyleHeader; NSError *versionedMethodError; - NSString *versionedMethodExpressionString = @(R"RE(^\+\s*\(NSURL\s*\*\s*\)\s*\w+StyleURLWithVersion\s*:\s*\(\s*NSInteger\s*\)\s*version\s*;)RE"); + NSString *versionedMethodExpressionString = @(R"RE(^\+\s*\(NSURL\s*\*\s*\)\s*\w+StyleURLWithVersion\s*:\s*\(\s*NSInteger\s*\)\s*version\s*\b)RE"); NSRegularExpression *versionedMethodExpression = [NSRegularExpression regularExpressionWithPattern:versionedMethodExpressionString options:NSRegularExpressionAnchorsMatchLines error:&versionedMethodError]; XCTAssertNil(versionedMethodError, @"Error compiling regular expression to search for versioned methods."); NSUInteger numVersionedMethodDeclarations = [versionedMethodExpression numberOfMatchesInString:styleHeader options:0 range:NSMakeRange(0, styleHeader.length)]; diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 6d54e0a7e..8dd1c5d8c 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -34,7 +34,21 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed an issue that could cause line label rendering glitches when the line geometry is projected to a point behind the plane of the camera. ([#9865](https://github.com/mapbox/mapbox-gl-native/pull/9865)) * Fixed an issue that could cause a crash when using `-[MGLMapView flyToCamera:completionHandler:]` and related methods with zoom levels at or near the maximum value. ([#9381](https://github.com/mapbox/mapbox-gl-native/pull/9381)) -## 3.6.2 +## 3.6.4 - September 25, 2017 + +* Fixed an issue where stale (but still valid) map data could be ignored in offline mode. ([#10012](https://github.com/mapbox/mapbox-gl-native/pull/10012)) + +## 3.6.3 - September 15, 2017 + +* Added the option to display an always-on heading indicator with the default user location annotation, controlled via the `MGLMapView.showsUserHeadingIndicator` property. ([#9886](https://github.com/mapbox/mapbox-gl-native/pull/9886)) +* Fixed an issue where user heading tracking mode would update too frequently. ([#9845](https://github.com/mapbox/mapbox-gl-native/pull/9845)) +* Added support for iOS 11 location usage descriptions. ([#9869](https://github.com/mapbox/mapbox-gl-native/pull/9869)) +* Fixed an issue where `MGLUserLocation.location` did not follow its documented initialization behavior. This property will now properly return `nil` until the user’s location has been determined. ([#9639](https://github.com/mapbox/mapbox-gl-native/pull/9639)) +* `MGLMapView`’s `minimumZoomLevel` and `maximumZoomLevel` properties are now available in Interface Builder’s Attributes inspector. ([#9729](https://github.com/mapbox/mapbox-gl-native/pull/9729)) +* Deprecated `+[MGLStyle trafficDayStyleURL]` and `+[MGLStyle trafficNightStyleURL]` with no replacement method. To use the Traffic Day and Traffic Night styles going forward, we recommend that you use the underlying URL. ([#9918](https://github.com/mapbox/mapbox-gl-native/pull/9918)) +* Fixed a crash that sometimes occurred when a map view's view controller was deallocated. ([#9995](https://github.com/mapbox/mapbox-gl-native/pull/9995)) + +## 3.6.2 - August 18, 2017 * Added an `MGLStyle.localizesLabels` property, off by default, that localizes any Mapbox Streets–sourced symbol layer into the user’s preferred language. ([#9582](https://github.com/mapbox/mapbox-gl-native/pull/9582)) * Added an additional camera method to MGLMapView that accepts an edge padding parameter. ([#9651](https://github.com/mapbox/mapbox-gl-native/pull/9651)) diff --git a/platform/ios/app/Info.plist b/platform/ios/app/Info.plist index 167e66fa0..a98a8c10c 100644 --- a/platform/ios/app/Info.plist +++ b/platform/ios/app/Info.plist @@ -27,9 +27,11 @@ NSHumanReadableCopyright © 2014–2017 Mapbox NSLocationAlwaysUsageDescription - The map will ALWAYS display the user’s location. + The map will display your location. The map may also use your location when it isn’t visible in order to improve OpenStreetMap and Mapbox products. NSLocationWhenInUseUsageDescription - The map will display the user’s location. + The map will display your location. + NSLocationAlwaysAndWhenInUseUsageDescription + The map will display your location. If you choose Always, the map may also use your location when it isn’t visible in order to improve OpenStreetMap and Mapbox products. UILaunchStoryboardName LaunchScreen UIMainStoryboardFile diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 8f7896ffe..07838bc6b 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -115,7 +115,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { @property (nonatomic) IBOutlet MGLMapView *mapView; -@property (weak, nonatomic) IBOutlet UILabel *hudLabel; +@property (weak, nonatomic) IBOutlet UIButton *hudLabel; @property (nonatomic) NSInteger styleIndex; @property (nonatomic) BOOL debugLoggingEnabled; @property (nonatomic) BOOL customUserLocationAnnnotationEnabled; @@ -163,7 +163,9 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { self.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsDebugLoggingEnabled"]; self.mapView.scaleBar.hidden = NO; + self.mapView.showsUserHeadingIndicator = YES; self.hudLabel.hidden = YES; + self.hudLabel.titleLabel.font = [UIFont monospacedDigitSystemFontOfSize:10 weight:UIFontWeightRegular]; if ([MGLAccountManager accessToken].length) { @@ -355,7 +357,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { [settingsTitles addObjectsFromArray:@[ [NSString stringWithFormat:@"%@ Reuse Queue Stats", (_reuseQueueStatsEnabled ? @"Hide" :@"Show")], @"Start World Tour", - [NSString stringWithFormat:@"%@ Zoom Level", (_showZoomLevelEnabled ? @"Hide" :@"Show")], + [NSString stringWithFormat:@"%@ Zoom/Pitch/Direction Label", (_showZoomLevelEnabled ? @"Hide" :@"Show")], @"Embedded Map View", [NSString stringWithFormat:@"%@ Second Map", ([self.view viewWithTag:2] == nil ? @"Show" : @"Hide")], [NSString stringWithFormat:@"Show Labels in %@", (_usingLocaleBasedCountryLabels ? @"Default Language" : [[NSLocale currentLocale] displayNameForKey:NSLocaleIdentifier value:[self bestLanguageForUser]])], @@ -550,6 +552,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { self.reuseQueueStatsEnabled = !self.reuseQueueStatsEnabled; self.hudLabel.hidden = !self.reuseQueueStatsEnabled; self.showZoomLevelEnabled = NO; + [self updateHUD]; break; } case MBXSettingsMiscellaneousShowZoomLevel: @@ -557,6 +560,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { self.showZoomLevelEnabled = !self.showZoomLevelEnabled; self.hudLabel.hidden = !self.showZoomLevelEnabled; self.reuseQueueStatsEnabled = NO; + [self updateHUD]; break; } case MBXSettingsMiscellaneousScrollView: @@ -1597,8 +1601,9 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { [MGLStyle darkStyleURL], [MGLStyle satelliteStyleURL], [MGLStyle satelliteStreetsStyleURL], - [MGLStyle trafficDayStyleURL], - [MGLStyle trafficNightStyleURL], + [NSURL URLWithString:@"mapbox://styles/mapbox/traffic-day-v2"], + [NSURL URLWithString:@"mapbox://styles/mapbox/traffic-night-v2"], + ]; NSAssert(styleNames.count == styleURLs.count, @"Style names and URLs don’t match."); @@ -1873,22 +1878,33 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { - (void)mapViewRegionIsChanging:(MGLMapView *)mapView { - if (self.reuseQueueStatsEnabled) { - NSUInteger queuedAnnotations = 0; - for (NSArray *queue in self.mapView.annotationViewReuseQueueByIdentifier.allValues) - { - queuedAnnotations += queue.count; - } - self.hudLabel.text = [NSString stringWithFormat:@" Visible: %ld Queued: %ld", (unsigned long)mapView.visibleAnnotations.count, (unsigned long)queuedAnnotations]; - } else if (self.showZoomLevelEnabled) { - self.hudLabel.text = [NSString stringWithFormat:@" Zoom: %.2f", self.mapView.zoomLevel]; - } + [self updateHUD]; } - (void)mapView:(MGLMapView *)mapView regionDidChangeAnimated:(BOOL)animated { - if (self.showZoomLevelEnabled) { - self.hudLabel.text = [NSString stringWithFormat:@" Zoom: %.2f", self.mapView.zoomLevel]; + [self updateHUD]; +} + +- (void)mapView:(MGLMapView *)mapView didUpdateUserLocation:(MGLUserLocation *)userLocation { + [self updateHUD]; +} + +- (void)updateHUD { + if (!self.reuseQueueStatsEnabled && !self.showZoomLevelEnabled) return; + + NSString *hudString; + + if (self.reuseQueueStatsEnabled) { + NSUInteger queuedAnnotations = 0; + for (NSArray *queue in self.mapView.annotationViewReuseQueueByIdentifier.allValues) { + queuedAnnotations += queue.count; + } + hudString = [NSString stringWithFormat:@"Visible: %ld Queued: %ld", (unsigned long)self.mapView.visibleAnnotations.count, (unsigned long)queuedAnnotations]; + } else if (self.showZoomLevelEnabled) { + hudString = [NSString stringWithFormat:@"%.2f ∕ ↕\U0000FE0E%.f° ∕ %.f°", self.mapView.zoomLevel, self.mapView.camera.pitch, self.mapView.direction]; } + + [self.hudLabel setTitle:hudString forState:UIControlStateNormal]; } @end diff --git a/platform/ios/app/Main.storyboard b/platform/ios/app/Main.storyboard index c7bcd6e0f..507582213 100644 --- a/platform/ios/app/Main.storyboard +++ b/platform/ios/app/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -33,17 +33,24 @@ -