diff options
Diffstat (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp')
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index d3ddf62b9e..0c1a631ad8 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -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; + auto 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); } } |