[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.
This commit is contained in:
John Firebaugh
2017-04-20 17:10:33 -07:00
parent c2b00378b7
commit 197751bace
9 changed files with 12 additions and 239 deletions

View File

@@ -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);
}
}
}