Require that per-feature maxzoom and minzoom be small integers

Also fixes a place in the Makefile that accidentally still used
CFLAGS instead of CXXFLAGS
This commit is contained in:
Eric Fischer
2018-07-12 11:24:30 -07:00
parent d64ac19f11
commit d1a0e495ce
7 changed files with 156 additions and 15 deletions
+3 -2
View File
@@ -13,6 +13,7 @@
#include "protozero/pbf_writer.hpp"
#include "milo/dtoa_milo.h"
#include "jsonpull/jsonpull.h"
#include "text.hpp"
#define POINT 0
#define MULTIPOINT 1
@@ -397,13 +398,13 @@ void readFeature(protozero::pbf_reader &pbf, size_t dim, double e, std::vector<s
json_object *min = json_hash_get(o, "minzoom");
if (min != NULL && (min->type == JSON_STRING || min->type == JSON_NUMBER)) {
sf.has_tippecanoe_minzoom = true;
sf.tippecanoe_minzoom = atoi(min->string);
sf.tippecanoe_minzoom = integer_zoom(sst->fname, min->string);
}
json_object *max = json_hash_get(o, "maxzoom");
if (max != NULL && (max->type == JSON_STRING || max->type == JSON_NUMBER)) {
sf.has_tippecanoe_maxzoom = true;
sf.tippecanoe_maxzoom = atoi(max->string);
sf.tippecanoe_maxzoom = integer_zoom(sst->fname, max->string);
}
json_object *tlayer = json_hash_get(o, "layer");