summaryrefslogtreecommitdiff
path: root/src/mbgl/map/transform.hpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-13 19:05:15 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-03-14 11:45:31 +0200
commitb5bb48edaa0a553a4b91c3632148bf86ac9e2bf6 (patch)
tree85d0d979f59488b772f63c22b99f1e0913ee3f0e /src/mbgl/map/transform.hpp
parentfe7e208b4224101f3feeddf9808ecedd3b0f486f (diff)
downloadqtlocation-mapboxgl-b5bb48edaa0a553a4b91c3632148bf86ac9e2bf6.tar.gz
[core] Simplify LatLng::unwrapForShortestPath usage
Simplify LatLng::{wrap,unwrapForShortestPath} code, avoiding duplicated code between Transform::{latLngToScreenCoordinate,easeTo,flyTo}. Added unit tests for camera usage in Transform to detect cases like e.g. crossing the antimeridian as a shortest path between two coordinates. Transform::flyTo precision loss to be handled in #4298.
Diffstat (limited to 'src/mbgl/map/transform.hpp')
-rw-r--r--src/mbgl/map/transform.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/map/transform.hpp b/src/mbgl/map/transform.hpp
index 1e84b013c9..980a198292 100644
--- a/src/mbgl/map/transform.hpp
+++ b/src/mbgl/map/transform.hpp
@@ -138,6 +138,8 @@ public:
// Transitions
bool inTransition() const;
Update updateTransitions(const TimePoint& now);
+ TimePoint getTransitionStart() const { return transitionStart; }
+ Duration getTransitionDuration() const { return transitionDuration; }
void cancelTransitions();
// Gesture