mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Update the layer list outside of the property loop
This commit is contained in:
+14
-14
@@ -218,16 +218,6 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::map<std::string, layermap_entry> &layermap = (*layermaps)[tiling_seg];
|
std::map<std::string, layermap_entry> &layermap = (*layermaps)[tiling_seg];
|
||||||
|
|
||||||
for (size_t i = 0; i < properties->length; i++) {
|
|
||||||
int tp = -1;
|
|
||||||
std::string s;
|
|
||||||
|
|
||||||
stringify_value(properties->values[i], tp, s, "Filter output", jp->line, j);
|
|
||||||
if (tp >= 0) {
|
|
||||||
mvt_value v = stringified_to_mvt_value(tp, s.c_str());
|
|
||||||
l->second.tag(feature, std::string(properties->keys[i]->string), v);
|
|
||||||
|
|
||||||
if (layermap.count(layername) == 0) {
|
if (layermap.count(layername) == 0) {
|
||||||
layermap_entry lme = layermap_entry(layermap.size());
|
layermap_entry lme = layermap_entry(layermap.size());
|
||||||
lme.minzoom = z;
|
lme.minzoom = z;
|
||||||
@@ -241,10 +231,6 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type_and_string tas;
|
|
||||||
tas.string = std::string(properties->keys[i]->string);
|
|
||||||
tas.type = tp;
|
|
||||||
|
|
||||||
auto fk = layermap.find(layername);
|
auto fk = layermap.find(layername);
|
||||||
if (z < fk->second.minzoom) {
|
if (z < fk->second.minzoom) {
|
||||||
fk->second.minzoom = z;
|
fk->second.minzoom = z;
|
||||||
@@ -252,6 +238,20 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
|
|||||||
if (z > fk->second.maxzoom) {
|
if (z > fk->second.maxzoom) {
|
||||||
fk->second.maxzoom = z;
|
fk->second.maxzoom = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < properties->length; i++) {
|
||||||
|
int tp = -1;
|
||||||
|
std::string s;
|
||||||
|
|
||||||
|
stringify_value(properties->values[i], tp, s, "Filter output", jp->line, j);
|
||||||
|
if (tp >= 0) {
|
||||||
|
mvt_value v = stringified_to_mvt_value(tp, s.c_str());
|
||||||
|
l->second.tag(feature, std::string(properties->keys[i]->string), v);
|
||||||
|
|
||||||
|
type_and_string tas;
|
||||||
|
tas.string = std::string(properties->keys[i]->string);
|
||||||
|
tas.type = tp;
|
||||||
|
|
||||||
fk->second.file_keys.insert(tas);
|
fk->second.file_keys.insert(tas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user