summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Agafonkin <agafonkin@gmail.com>2015-12-09 16:41:27 -0800
committerKonstantin Käfer <mail@kkaefer.com>2015-12-10 12:59:49 -0800
commitb44331245a01ac054a2c9614370690cb320a004b (patch)
treeac2b50ece1332fdb54156aee7234c87a501b3fcf
parentda7b6bb8b943c8c49c140bd3350500582dc9280f (diff)
downloadqtlocation-mapboxgl-b44331245a01ac054a2c9614370690cb320a004b.tar.gz
[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
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp
index a09430e829..30a6f6e66e 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<mapbox::geojsonvt::GeoJSONVT>(features, options);
}