summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-20 17:10:33 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-02 08:45:09 -0700
commit197751bace6181f2c2dbe4c890f277a0dc7e58b1 (patch)
tree55e57a6a1d86d1db26f24d3d58694f69518cbd97 /src
parentc2b00378b78b55d50968a9b11ed75bb4edf62ec9 (diff)
downloadqtlocation-mapboxgl-197751bace6181f2c2dbe4c890f277a0dc7e58b1.tar.gz
[core] Load source TileJSON immediately
This reverses #3095. Rationale: * We're now exposing source attributes as a public API. Making those attributes unavailable at certain times complicates that API. * We're preparing to split RenderSource out of Source. Removing this removes a point of coupling between the two.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/style.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 8dfe7eac06..0bc1841566 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -164,6 +164,8 @@ void Style::addSource(std::unique_ptr<Source> source) {
}
source->baseImpl->setObserver(this);
+ source->baseImpl->loadDescription(fileSource);
+
sources.emplace_back(std::move(source));
}
@@ -387,9 +389,6 @@ void Style::recalculate(float z, const TimePoint& timePoint, MapMode mode) {
// If this layer has a source, make sure that it gets loaded.
if (Source* source = getSource(layer->baseImpl.source)) {
source->baseImpl->enabled = true;
- if (!source->baseImpl->loaded) {
- source->baseImpl->loadDescription(fileSource);
- }
}
}