summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation/shape_annotation_impl.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-02-22 01:06:21 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-01 20:58:54 +0000
commit9771b0e569d91c37ab3ac98ef8bee11c816ddc80 (patch)
tree948bf1c460c865e8403751cd340fac6a9464cd06 /src/mbgl/annotation/shape_annotation_impl.cpp
parentfcaafcc428f932e36e195e6801855344798ca33e (diff)
downloadqtlocation-mapboxgl-9771b0e569d91c37ab3ac98ef8bee11c816ddc80.tar.gz
[core] Use GeometryTileFeature::defaultExtent by default
GeoJSONTile and AnnotationTile don't need to reimplement getExtent() if they use the same default value. This also helps point and shape annotations to avoid using raw values.
Diffstat (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp')
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp
index c8b31ef11f..a9277ee0a7 100644
--- a/src/mbgl/annotation/shape_annotation_impl.cpp
+++ b/src/mbgl/annotation/shape_annotation_impl.cpp
@@ -81,11 +81,10 @@ void ShapeAnnotationImpl::updateStyle(Style& style) {
void ShapeAnnotationImpl::updateTile(const TileID& tileID, AnnotationTile& tile) {
static const double baseTolerance = 4;
- static const uint16_t extent = 4096;
if (!shapeTiler) {
const uint64_t maxAmountOfTiles = 1 << maxZoom;
- const double tolerance = baseTolerance / (maxAmountOfTiles * extent);
+ const double tolerance = baseTolerance / (maxAmountOfTiles * GeometryTileFeature::defaultExtent);
geojsonvt::ProjectedRings rings;
std::vector<geojsonvt::LonLat> points;