summaryrefslogtreecommitdiff
path: root/src/mbgl/style/style_layer_group.cpp
blob: f57ec5cc7b1ddac3506d29f910d27bc32e667499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <mbgl/style/style_layer_group.hpp>

namespace mbgl {

void StyleLayerGroup::setClasses(const std::vector<std::string> &class_names, std::chrono::steady_clock::time_point now,
                                 const PropertyTransition &defaultTransition) {
    for (const util::ptr<StyleLayer> &layer : layers) {
        if (layer) {
            layer->setClasses(class_names, now, defaultTransition);
        }
    }
}

void StyleLayerGroup::updateProperties(float z, std::chrono::steady_clock::time_point now, ZoomHistory &zoomHistory) {
    for (const util::ptr<StyleLayer> &layer: layers) {
        if (layer) {
            layer->updateProperties(z, now, zoomHistory);
        }
    }
}

bool StyleLayerGroup::hasTransitions() const {
    for (const util::ptr<const StyleLayer> &layer: layers) {
        if (layer) {
            if (layer->hasTransitions()) {
                return true;
            }
        }
    }
    return false;
}


}