From c561ea5d0564193a4fb7cb84fba5a2d008e30540 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 10 Mar 2016 19:49:09 +0200 Subject: [PATCH] [core] Check for NaNs in mbgl::util::{min,max,clamp} --- src/mbgl/annotation/point_annotation_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mbgl/annotation/point_annotation_impl.cpp b/src/mbgl/annotation/point_annotation_impl.cpp index c02b60c74..e073394f7 100644 --- a/src/mbgl/annotation/point_annotation_impl.cpp +++ b/src/mbgl/annotation/point_annotation_impl.cpp @@ -13,7 +13,7 @@ void PointAnnotationImpl::updateLayer(const TileID& tileID, AnnotationTileLayer& featureProperties.emplace("sprite", point.icon.empty() ? std::string("default_marker") : point.icon); mbgl::ScreenCoordinate projected = point.position.project(); - projected *= 1 << tileID.z; + projected *= std::pow(2, tileID.z); projected.x = std::fmod(projected.x, 1); projected.y = std::fmod(projected.y, 1); projected *= GeometryTileFeature::defaultExtent;