summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.mm
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-11-22 12:18:27 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-11-22 20:58:51 +0100
commit9353fcbf4cde1f8ca2e0d30cabeb64aa3528682e (patch)
treedf198d7b62588cdd66cfe55202f9a06ce29333b5 /platform/darwin/src/MGLStyle.mm
parenta71868fc8d68fec0b34988d90ef1165c0c87d1db (diff)
downloadqtlocation-mapboxgl-9353fcbf4cde1f8ca2e0d30cabeb64aa3528682e.tar.gz
[build] move default_styles to platform/default
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)