[test] update test suite to include more comprehensive GeoJSON tests

This commit is contained in:
Konstantin Käfer
2015-12-10 17:46:13 -08:00
parent c4a01d51ea
commit 8d711e9c80
9 changed files with 29 additions and 18 deletions

View File

@@ -61,6 +61,7 @@ void Source::load() {
return;
}
// URL may either be a TileJSON file, or a GeoJSON file.
FileSource* fs = util::ThreadContext::getFileSource();
req = fs->request({ Resource::Kind::Source, info.url }, [this](Response res) {
if (res.stale) {
@@ -86,7 +87,12 @@ void Source::load() {
return;
}
info.parseTileJSONProperties(d);
if (info.type == SourceType::Vector || info.type == SourceType::Raster) {
info.parseTileJSONProperties(d);
} else if (info.type == SourceType::GeoJSON) {
info.parseGeoJSON(d);
}
loaded = true;
emitSourceLoaded();