diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-04-25 20:52:47 -0400 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-05-12 10:02:27 -0700 |
commit | c5ee41a93a1f012acf41f29dc8bd75dc736ff4bc (patch) | |
tree | 761e85b0c1b0398e67ed97391bdda78848594147 /platform/default | |
parent | d85471b7deb9c57973f9b70e0dfe4a8f386c8a01 (diff) | |
download | qtlocation-mapboxgl-c5ee41a93a1f012acf41f29dc8bd75dc736ff4bc.tar.gz |
[ios, macos] Undeprecated unversioned style URL factory methods
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.
Cherry-picked from 9e384b78fbcf46d66d390122eefdf273f91b314e.
Diffstat (limited to 'platform/default')
-rw-r--r-- | platform/default/mbgl/util/default_styles.cpp | 12 | ||||
-rw-r--r-- | platform/default/mbgl/util/default_styles.hpp | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/platform/default/mbgl/util/default_styles.cpp b/platform/default/mbgl/util/default_styles.cpp index 5457d0f0a2..e051817ada 100644 --- a/platform/default/mbgl/util/default_styles.cpp +++ b/platform/default/mbgl/util/default_styles.cpp @@ -4,12 +4,12 @@ namespace mbgl { namespace util { namespace default_styles { -const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v10", "Streets" }; -const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v10", "Outdoors" }; -const DefaultStyle light = { "mapbox://styles/mapbox/light-v9", "Light" }; -const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v9", "Dark" }; -const DefaultStyle satellite = { "mapbox://styles/mapbox/satellite-v9", "Satellite" }; -const DefaultStyle satelliteStreets = { "mapbox://styles/mapbox/satellite-streets-v10", "Satellite Streets" }; +const DefaultStyle streets = { "mapbox://styles/mapbox/streets-v10", "Streets", 10 }; +const DefaultStyle outdoors = { "mapbox://styles/mapbox/outdoors-v10", "Outdoors", 10 }; +const DefaultStyle light = { "mapbox://styles/mapbox/light-v9", "Light", 9 }; +const DefaultStyle dark = { "mapbox://styles/mapbox/dark-v9", "Dark", 9 }; +const DefaultStyle satellite = { "mapbox://styles/mapbox/satellite-v9", "Satellite", 9 }; +const DefaultStyle satelliteStreets = { "mapbox://styles/mapbox/satellite-streets-v10", "Satellite Streets", 10 }; } // namespace default_styles } // end namespace util diff --git a/platform/default/mbgl/util/default_styles.hpp b/platform/default/mbgl/util/default_styles.hpp index 32944394aa..5e0d083d82 100644 --- a/platform/default/mbgl/util/default_styles.hpp +++ b/platform/default/mbgl/util/default_styles.hpp @@ -10,6 +10,7 @@ namespace default_styles { struct DefaultStyle { const char* url; const char* name; + const unsigned currentVersion; }; extern const DefaultStyle streets; @@ -24,8 +25,6 @@ const DefaultStyle orderedStyles[] = { }; const size_t numOrderedStyles = sizeof(orderedStyles) / sizeof(DefaultStyle); -static const unsigned currentVersion = 10; - } // end namespace default_styles } // end namespace util } // end namespace mbgl |