v10 default styles#6301
Conversation
|
@1ec5, thanks for your PR! By analyzing this pull request, we identified @bleege, @tmpsantos and @jfirebaugh to be potential reviewers. |
|
@1ec5 thanks! Just food for thought, not exactly related to this PR, but if a style change also upgrades the tile source, we need to think about a way of not rendering tiles on the offline database useless. |
|
Can you elaborate? Is the concern that the user would have to redownload a region's tiles if the v10 Streets style uses a newer version of the Streets source (say, v8) than the v9 Streets style? Styles are somewhat tightly coupled to the sources they reference, so I'm not sure how we'd address that issue without adding custom tile migration logic for individual sources. |
Makes sense. Yeah, in this case, if you wanna keep the offline database, better not upgrade the style. Thanks! |
|
@1ec5 - |
|
@1ec5 Thanks for updating the Android versions as well, is there any tail work required on Android once this PR gets merged? |
|
v10 has been released for Streets, Outdoors, and Satellite Streets. Apparently the styles are versioned separately, so Light, Dark, and Satellite are still stuck on v9. This PR will need to be reworked to reflect that fact:
|
9f29c99 to
2df753a
Compare
|
Not critical for v3.4.1, and no Mapbox-wide timetable for releasing the v10 styles. Moving off the v3.4.1 milestone. |
2df753a to
f7df5f7
Compare
| const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v10", "Outdoors" }; | ||
| const DefaultStyle light = { "mapbox://styles/mapbox/light-v10", "Light" }; | ||
| const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v10", "Dark" }; | ||
| const DefaultStyle satellite = { "mapbox://styles/mapbox/satellite-v10", "Satellite" }; |
There was a problem hiding this comment.
We don't have a v10 for light, dark and satellite.
There was a problem hiding this comment.
I originally authored this PR before any of the v10 styles went public, so it wasn’t clear to me. #6301 (comment) tracks other things that need to happen before this PR can land.
Can we log that to the console for Debug builds only? I think disabling runtime styling for certain URLs could also lead to very weird behavior and increases the complexity. |
Yes, a log message would certainly be doable. If our goal is to alert about programmer error, though, maybe it should be present in release builds as well, but once per session, like the warning about using floats in predicates. As far as disabling runtime styling for unversioned URLs, I think this is something that MGLMapView would be able to handle: |
98890a1 to
abde819
Compare
abde819 to
6213fb2
Compare
| ### Other changes | ||
|
|
||
| * Xcode 8.0 or higher is now recommended for using this SDK. ([#8775](https://github.com/mapbox/mapbox-gl-native/pull/8775)) | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Whoops, I missed that one – good catch! Fixed in 1d0e203.
Upgraded from v9 default styles to v10 wherever the developer expects to get the latest and greatest, as well as in a couple tests where it may be beneficial to ensure that we can handle a two-digit version number in the style URL.
MGLStyleDefaultVersion is just for Streets now. Deleted style version documentation tests because not all styles are on the same version.
Undeprecated the unversioned style URL factory methods in MGLStyle for consistency with the Android and Qt SDKs. Added warnings about using them with the runtime styling API. Refactored mbgl::util::default_styles to track different versions for different styles.
The Styles API section of the Mapbox API Documentation site now lists Traffic Day v2 and Traffic Night v2, so this change adds those styles to all the places where styles are listed. Also switched iosapp and macosapp to unversioned style factory methods since MGLStyleDefaultVersion is no longer applicable for all styles.
1b2f5f0 to
4387c75
Compare
Tracking as possible tail work in #8971. |
|
Cherry-picking into the release-ios-v3.6.0-android-v5.1.0 branch in #8972. |
Upgraded from v9 default styles to v10 wherever the developer expects to get the latest and greatest, as well as in a couple tests where it may be beneficial to ensure that we can handle a two-digit version number in the style URL.
Added the Traffic Day v2 and Traffic Night v2 styles, which are now documented as part of the styles API in Mapbox API Documentation.
This PR also partially reverses the decision in #4702 to require iOS and macOS developers to specify a style version number when calling one of MGLStyle’s style URL factory methods. The versioned methods are still there, but the unversioned methods are no longer deprecated. This change makes the iOS and macOS SDKs consistent with the Android and Qt SDKs, which never followed suit and kept their unversioned constants.
Hold until the v10 styles are live./cc @tobrun @friedbunny @tmpsantos @amyleew