From b44331245a01ac054a2c9614370690cb320a004b Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Wed, 9 Dec 2015 16:41:27 -0800 Subject: [PATCH] [core] update geojson-vt options - fix the code to use the same simplification tolerance - remove outdated indexMaxZoom/Points values and rely on default - bump buffer 2x to fix bleeding linecaps on thick lines --- src/mbgl/annotation/shape_annotation_impl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index a09430e82..30a6f6e66 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -80,7 +80,7 @@ void ShapeAnnotationImpl::updateStyle(Style& style) { } void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) { - static const double baseTolerance = 3; + static const double baseTolerance = 10; static const uint16_t extent = 4096; if (!shapeTiler) { @@ -108,9 +108,8 @@ void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) mapbox::geojsonvt::Options options; options.maxZoom = maxZoom; - options.indexMaxZoom = 4; - options.indexMaxPoints = 100; - options.tolerance = 10; + options.buffer = 128u; + options.tolerance = baseTolerance; shapeTiler = std::make_unique(features, options); }