Implement Style::isLoaded

This commit is contained in:
John Firebaugh
2015-04-21 17:36:50 -07:00
parent 6c7a01a503
commit ec7588f1fd
5 changed files with 37 additions and 1 deletions

View File

@@ -86,4 +86,24 @@ void Style::loadJSON(const uint8_t *const data) {
glyph_url = parser.getGlyphURL();
}
bool Style::isLoaded() const {
// TODO: move loading into Style
// if (!loaded) {
// return false;
// }
for (const auto& source : sources) {
if (!source->isLoaded()) {
return false;
}
}
// TODO: move sprite into Style
// if (sprite && !sprite.isLoaded()) {
// return false;
// }
return true;
}
}