summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mbgl/style/style_impl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mbgl/style/style_impl.cpp b/src/mbgl/style/style_impl.cpp
index 95a39819fc..6aa80d3802 100644
--- a/src/mbgl/style/style_impl.cpp
+++ b/src/mbgl/style/style_impl.cpp
@@ -347,7 +347,13 @@ Immutable<std::vector<Immutable<Image::Impl>>> Style::Impl::getImageImpls() cons
}
Immutable<std::vector<Immutable<Source::Impl>>> Style::Impl::getSourceImpls() const {
- return sources.getImpls();
+ auto impls = sources.getImpls();
+ mutate(impls, [&] (auto& impls_) {
+ std::sort(impls_.begin(), impls_.end(), [](const auto& a, const auto& b) {
+ return a->id < b->id;
+ });
+ });
+ return impls;
}
Immutable<std::vector<Immutable<Layer::Impl>>> Style::Impl::getLayerImpls() const {