Only movetos and linetos have elevations, not closepaths

This commit is contained in:
Eric Fischer 2018-10-11 17:04:03 -07:00
parent 6315009cc1
commit c3d06f8931

View File

@ -468,6 +468,7 @@ bool mvt_tile::decode(std::string &message, bool &was_compressed) {
std::vector<long> &elevations = layer.features[i].elevations;
if (elevations.size() != 0) {
for (size_t j = 0; j < geom.size(); j++) {
if (geom[j].op == mvt_moveto || geom[j].op == mvt_lineto) {
if (off < elevations.size()) {
double el;
@ -483,6 +484,7 @@ bool mvt_tile::decode(std::string &message, bool &was_compressed) {
}
}
}
}
elevations.clear();
}