summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLStyle.mm')
-rw-r--r--platform/darwin/src/MGLStyle.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm
index e63e5e0aa8..2deaf794e8 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -61,7 +61,11 @@ static_assert(mbgl::util::default_styles::currentVersion == MGLStyleDefaultVersi
} \
\
+ (NSURL *)name##StyleURL##WithVersion:(NSInteger)version { \
- return [NSURL URLWithString:[@"mapbox://styles/mapbox/" #fileName "-v" stringByAppendingFormat:@"%li", (long)version]]; \
+ if (mbgl::util::default_styles::currentVersion == version) { \
+ return [NSURL URLWithString:@(mbgl::util::default_styles::name.url)]; \
+ } else { \
+ return [NSURL URLWithString:[@"mapbox://styles/mapbox/" #fileName "-v" stringByAppendingFormat:@"%li", (long)version]]; \
+ } \
}
MGL_DEFINE_STYLE(streets, streets)