[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 9e384b78fb.
This commit is contained in:
committed by
Minh Nguyễn
parent
d85471b7de
commit
c5ee41a93a
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user