From 1946896ace3f5fa8b6086fb416ea934fea387f12 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 13 Jan 2017 17:51:30 +0100 Subject: Adapt QQuickGeoMapGestureArea to work with tilted and rotated maps This patch fixes the handling of pan/flick/pinch in presence of tilt or bearing. Change-Id: Iad04fd92e1c8e318e3b1b0d344852c81e554ebb7 Reviewed-by: Laszlo Agocs --- src/positioning/qlocationutils_p.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/positioning') diff --git a/src/positioning/qlocationutils_p.h b/src/positioning/qlocationutils_p.h index c73a2c3b..f66179e1 100644 --- a/src/positioning/qlocationutils_p.h +++ b/src/positioning/qlocationutils_p.h @@ -97,11 +97,11 @@ public: return lng >= -180.0 && lng <= 180.0; } - inline static double clipLat(double lat) { - if (lat > 90.0) - lat = 90.0; - else if (lat < -90.0) - lat = -90.0; + inline static double clipLat(double lat, double clipValue = 90.0) { + if (lat > clipValue) + lat = clipValue; + else if (lat < -clipValue) + lat = -clipValue; return lat; } -- cgit v1.2.1