[core] shared data among AnnotationTileFeature objects

This commit is contained in:
Konstantin Käfer
2017-06-20 11:40:56 -07:00
parent 4bfc559223
commit 4ea4715179
5 changed files with 82 additions and 30 deletions

View File

@@ -38,7 +38,7 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati
if (shapeTile.features.empty())
return;
AnnotationTileLayer& layer = data.layers.emplace(layerID, layerID).first->second;
AnnotationTileLayer& layer = data.addLayer(layerID);
ToGeometryCollection toGeometryCollection;
ToFeatureType toFeatureType;
@@ -53,7 +53,7 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati
renderGeometry = fixupPolygons(renderGeometry);
}
layer.features.emplace_back(id, featureType, renderGeometry);
layer.addFeature(id, featureType, renderGeometry);
}
}