summaryrefslogtreecommitdiff
path: root/include/mbgl/map/camera.hpp
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2015-07-30 15:34:49 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-09-07 09:22:52 -0700
commit0a172a21fdc2a87473560fd7d45f4d495d95de91 (patch)
treee4b0ccd7ee2fecdfe63ead975cbb646493ff2bb4 /include/mbgl/map/camera.hpp
parent584c36f348d586bd07d27e6a4c9a7f318a98044c (diff)
downloadqtlocation-mapboxgl-0a172a21fdc2a87473560fd7d45f4d495d95de91.tar.gz
CameraOptions
Plumbed camera options all the way through to MGLMapView. Added a method that lets you specify a direction in addition to center point and zoom level. Added Map::jumpTo() for parity with mapbox-gl-js. Replaced usage of Map::setLatLng() and Map::setLatLngZoom() with Map::jumpTo() or Map::easeTo() within MGLMapView. Replaced MGLMapView.pitch with MGLMapCamera for setting all supported degrees of freedom simultaneously. Simultaneously move and rotate with course. Support customizable timing functions on iOS. iosapp now persists an archived MGLMapCamera instead of separate viewpoint properties and also synchronizes user defaults on termination. This change implements persistence entirely in Objective-C, eliminating the use of the Objective-C++ implementation. Fixes #1643, fixes #1834. Ref #1581.
Diffstat (limited to 'include/mbgl/map/camera.hpp')
-rw-r--r--include/mbgl/map/camera.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/mbgl/map/camera.hpp b/include/mbgl/map/camera.hpp
new file mode 100644
index 0000000000..bd0b353bae
--- /dev/null
+++ b/include/mbgl/map/camera.hpp
@@ -0,0 +1,22 @@
+#ifndef MBGL_MAP_CAMERA
+#define MBGL_MAP_CAMERA
+
+#include <mbgl/util/geo.hpp>
+#include <mbgl/util/optional.hpp>
+#include <mbgl/util/chrono.hpp>
+#include <mbgl/util/unitbezier.hpp>
+
+namespace mbgl {
+
+struct CameraOptions {
+ mapbox::util::optional<LatLng> center;
+ mapbox::util::optional<double> zoom;
+ mapbox::util::optional<double> angle;
+ mapbox::util::optional<double> pitch;
+ mapbox::util::optional<Duration> duration;
+ mapbox::util::optional<mbgl::util::UnitBezier> easing;
+};
+
+}
+
+#endif /* MBGL_MAP_CAMERA */