diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-01-13 17:51:30 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-01-26 14:46:21 +0000 |
commit | 1946896ace3f5fa8b6086fb416ea934fea387f12 (patch) | |
tree | ff64d144760bef6d917967579b2c7e368dac7a6e /src/positioning | |
parent | d83f23e1ef19fe524c50b827ee408523dbb74bdc (diff) | |
download | qtlocation-1946896ace3f5fa8b6086fb416ea934fea387f12.tar.gz |
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 <laszlo.agocs@qt.io>
Diffstat (limited to 'src/positioning')
-rw-r--r-- | src/positioning/qlocationutils_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |