Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] MapChangeDidFinishLoadingStyle - Ensure style is loaded (#6392)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivovandongen authored Sep 20, 2016
1 parent f3b38df commit 8b0694b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mbgl/style/style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ void Style::setJSON(const std::string& json) {
Log::Error(Event::ParseStyle, "Failed to parse style: %s", util::toString(error).c_str());
observer->onStyleError();
observer->onResourceError(error);

return;
} else {
observer->onStyleLoaded();
}

for (auto& source : parser.sources) {
Expand All @@ -127,6 +124,8 @@ void Style::setJSON(const std::string& json) {
spriteAtlas->load(parser.spriteURL, fileSource);

loaded = true;

observer->onStyleLoaded();
}

void Style::addSource(std::unique_ptr<Source> source) {
Expand Down

0 comments on commit 8b0694b

Please sign in to comment.