Add documentation. Be lenient about zooms as numbers vs strings.

This commit is contained in:
Eric Fischer
2015-10-07 13:54:31 -07:00
parent c0480673c5
commit 6767aa7a5c
3 changed files with 52 additions and 0 deletions
+6
View File
@@ -451,11 +451,17 @@ int serialize_geometry(json_object *geometry, json_object *properties, const cha
if (min != NULL && min->type == JSON_NUMBER) {
tippecanoe_minzoom = min->number;
}
if (min != NULL && min->type == JSON_STRING) {
tippecanoe_minzoom = atoi(min->string);
}
json_object *max = json_hash_get(tippecanoe, "maxzoom");
if (max != NULL && max->type == JSON_NUMBER) {
tippecanoe_maxzoom = max->number;
}
if (max != NULL && max->type == JSON_STRING) {
tippecanoe_maxzoom = atoi(max->string);
}
}
unsigned bbox[] = {UINT_MAX, UINT_MAX, 0, 0};