diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-03-02 13:55:06 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-03-03 09:54:07 +0000 |
commit | 7af45b0a519e1000732bb1e5eb7cb2afd997646e (patch) | |
tree | d3086df89192833ac90a0cf87d7e50850a42300e | |
parent | 820f79284248e5fcc9910282055e67f07c918559 (diff) | |
download | qtlocation-7af45b0a519e1000732bb1e5eb7cb2afd997646e.tar.gz |
Avoid non-valid coordinate as endCorrdinate for flicking
QQuickGeoCoordinateAnimation is able to use correct interpolator
so endCoordinate can be wrapped correctly to be a valid coordinate.
Change-Id: I6f0138fde010a54afd7992c767089fd053e79937
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/imports/location/qquickgeomapgesturearea.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/location/qquickgeomapgesturearea.cpp b/src/imports/location/qquickgeomapgesturearea.cpp index 938d2170..f324d10e 100644 --- a/src/imports/location/qquickgeomapgesturearea.cpp +++ b/src/imports/location/qquickgeomapgesturearea.cpp @@ -1229,6 +1229,11 @@ void QQuickGeoMapGestureArea::startFlick(int dx, int dy, int timeMs) else if (latitude < -85.05113) latitude = -85.05113; + if (longitude > 180) + longitude = longitude - 360; + else if (longitude < -180) + longitude = longitude + 360; + animationEndCoordinate.setLongitude(longitude); animationEndCoordinate.setLatitude(latitude); |