Remove Map dependency from Source::load

This commit is contained in:
John Firebaugh
2015-04-03 17:10:54 -07:00
parent e72ee04482
commit 750cfb6f58
3 changed files with 15 additions and 6 deletions

View File

@@ -741,7 +741,10 @@ void Map::loadStyleJSON(const std::string& json, const std::string& base) {
glyphStore->setURL(glyphURL);
for (const auto& source : style->sources) {
source->load(*this, *env);
source->load(getAccessToken(), *env, [this]() {
assert(Environment::currentlyOn(ThreadType::Map));
triggerUpdate();
});
}
triggerUpdate(Update::Zoom);