summaryrefslogtreecommitdiff
path: root/src/style/style.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-07-02 17:31:55 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-07-02 17:31:55 +0200
commitac57125bd53f045540b08a95b2a4552b13e63318 (patch)
treec9acd3bf254256c7eea0833db502a27e7ae54271 /src/style/style.cpp
parent415214d75927481570cc3bb9129ab343413a9578 (diff)
downloadqtlocation-mapboxgl-ac57125bd53f045540b08a95b2a4552b13e63318.tar.gz
fix background painting
Diffstat (limited to 'src/style/style.cpp')
-rw-r--r--src/style/style.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/style/style.cpp b/src/style/style.cpp
index d6894f6e1c..b11cd92260 100644
--- a/src/style/style.cpp
+++ b/src/style/style.cpp
@@ -108,4 +108,15 @@ void Style::loadJSON(const uint8_t *const data) {
updateClasses();
}
+const BackgroundProperties &Style::getBackgroundProperties() const {
+ if (layers && layers->layers.size()) {
+ const auto first = layers->layers.front();
+ if (first && first->id == "background") {
+ return first->getProperties<BackgroundProperties>();
+ }
+ }
+
+ return defaultStyleProperties<BackgroundProperties>();
+}
+
}