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

[core] MapChangeDidFinishLoadingStyle - Ensure style is loaded #6392

Merged
merged 1 commit into from
Sep 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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