diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-07 21:52:23 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-03-10 03:36:45 +0200 |
commit | dc2853533f4e641ac192ebca5458f876109441ff (patch) | |
tree | c66fcee9dd6304ee0dc65b2b27d7e876ef56f4b0 | |
parent | 026b6d4c01a3d96af9629cc1790373137ecab950 (diff) | |
download | qtlocation-mapboxgl-dc2853533f4e641ac192ebca5458f876109441ff.tar.gz |
[core] Fixes point annotations misplaced on maximum scale
-rw-r--r-- | src/mbgl/annotation/point_annotation_impl.cpp | 4 |
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( |