diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index 4ab9958fd..4f1863874 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -96,10 +96,12 @@ std::unique_ptr ShapeAnnotationImpl::createFillLayer() { } void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) { + static const double baseTolerance = 3; + static const uint16_t extent = 4096; + if (!shapeTiler) { - const double baseTolerance = 3; - const uint16_t extent = 4096; - const double tolerance = baseTolerance / ((1 << maxZoom) * extent); + const uint64_t maxAmountOfTiles = 1 << maxZoom; + const double tolerance = baseTolerance / (maxAmountOfTiles * extent); ProjectedGeometryContainer rings; std::vector points;