From 4f338577a8dba92e69e8eea23d255d46e52c9c85 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Tue, 24 Jan 2017 16:16:20 +0100 Subject: Add tilt and bearing gestures to QQuickGeoMapGestureArea This patch adds two new gestures to the Map gesture area, that are two finger rotation and two finger parallel vertical sliding. The first gesture changes the bearing of the map, while the second gesture changes the tilt angle. The rotation gesture can co-exist with both pan and pinch. In other words it's possible to put down two fingers on the map, and rotate, pinch and pan at the same time. The tilt gesture, on the other hand, excludes the others when initiated, and also does not start, if any of the other actions is in progress. Change-Id: I0ef003caf0efe4addcf2e5ad563212f3c53db9ba Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/location/declarativemaps/qdeclarativegeomap.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/location/declarativemaps/qdeclarativegeomap.cpp') diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp index 7e35321c..970161fa 100644 --- a/src/location/declarativemaps/qdeclarativegeomap.cpp +++ b/src/location/declarativemaps/qdeclarativegeomap.cpp @@ -839,6 +839,8 @@ qreal QDeclarativeGeoMap::zoomLevel() const void QDeclarativeGeoMap::setBearing(qreal bearing) { bearing = std::fmod(bearing, qreal(360.0)); + if (bearing < 0.0) + bearing += 360.0; if (m_map && !m_map->cameraCapabilities().supportsBearing()) bearing = 0.0; if (m_cameraData.bearing() == bearing || bearing < 0.0) -- cgit v1.2.1