summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-07 21:52:23 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-10 03:36:45 +0200
commitdc2853533f4e641ac192ebca5458f876109441ff (patch)
treec66fcee9dd6304ee0dc65b2b27d7e876ef56f4b0
parent026b6d4c01a3d96af9629cc1790373137ecab950 (diff)
downloadqtlocation-mapboxgl-dc2853533f4e641ac192ebca5458f876109441ff.tar.gz
[core] Fixes point annotations misplaced on maximum scale
-rw-r--r--src/mbgl/annotation/point_annotation_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/annotation/point_annotation_impl.cpp b/src/mbgl/annotation/point_annotation_impl.cpp
index b54995bfdd..c02b60c748 100644
--- a/src/mbgl/annotation/point_annotation_impl.cpp
+++ b/src/mbgl/annotation/point_annotation_impl.cpp
@@ -14,8 +14,8 @@ void PointAnnotationImpl::updateLayer(const TileID& tileID, AnnotationTileLayer&
mbgl::ScreenCoordinate projected = point.position.project();
projected *= 1 << tileID.z;
- projected.x -= int16_t(projected.x);
- projected.y -= int16_t(projected.y);
+ projected.x = std::fmod(projected.x, 1);
+ projected.y = std::fmod(projected.y, 1);
projected *= GeometryTileFeature::defaultExtent;
layer.features.emplace_back(