Track the minzoom and maxzoom for each layer separately

This commit is contained in:
Eric Fischer
2016-09-19 17:53:31 -07:00
parent d7037f3d3a
commit 437152e02b
6 changed files with 20 additions and 4 deletions
+2 -2
View File
@@ -242,11 +242,11 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, int minzoom, int
aprintf(&buf, ", ");
}
auto fk = layermap.find(lnames[i]);
aprintf(&buf, "{ \"id\": \"");
quote(&buf, lnames[i].c_str());
aprintf(&buf, "\", \"description\": \"\", \"minzoom\": %d, \"maxzoom\": %d, \"fields\": {", minzoom, maxzoom);
aprintf(&buf, "\", \"description\": \"\", \"minzoom\": %d, \"maxzoom\": %d, \"fields\": {", fk->second.minzoom, fk->second.maxzoom);
auto fk = layermap.find(lnames[i]);
std::set<type_and_string>::iterator j;
bool first = true;
for (j = fk->second.file_keys.begin(); j != fk->second.file_keys.end(); ++j) {