summaryrefslogtreecommitdiff
path: root/src/style/style_layer_group.cpp
blob: c7e4360d21098bdd679589328b4090939bf5adee (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
35

#include <mbgl/style/style_layer_group.hpp>

namespace mbgl {

void StyleLayerGroup::setClasses(const std::vector<std::string> &class_names, timestamp now,
                                 const PropertyTransition &defaultTransition) {
    for (const std::shared_ptr<StyleLayer> &layer : layers) {
        if (layer) {
            layer->setClasses(class_names, now, defaultTransition);
        }
    }
}

void StyleLayerGroup::updateProperties(float z, timestamp t) {
    for (const std::shared_ptr<StyleLayer> &layer: layers) {
        if (layer) {
            layer->updateProperties(z, t);
        }
    }
}

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


}