summaryrefslogtreecommitdiff
path: root/include/mbgl/map/camera.hpp
blob: 184ee87464bbc4f8acb2bb9e35de905b53b9c7d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef MBGL_MAP_CAMERA
#define MBGL_MAP_CAMERA

#include <mapbox/optional.hpp>

#include <mbgl/util/geo.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/unitbezier.hpp>

#include <functional>

namespace mbgl {

struct CameraOptions {
    mapbox::util::optional<LatLng> center;      // Map center (Degrees)
    mapbox::util::optional<double> zoom;        // Map zoom level Positive Numbers > 0 and < 18
    mapbox::util::optional<double> angle;       // Map rotation bearing in Radians counter-clockwise from north. The value is wrapped to [−π rad, π rad]
    mapbox::util::optional<double> pitch;       // Map angle in degrees at which the camera is looking to ground (Radians)
    mapbox::util::optional<Duration> duration;  // Animation time length (Nanoseconds)
    mapbox::util::optional<double> speed;
    mapbox::util::optional<double> curve;
    mapbox::util::optional<mbgl::util::UnitBezier> easing;
    std::function<void(double)> transitionFrameFn;
    std::function<void()> transitionFinishFn;
};

} // namespace mbgl

#endif /* MBGL_MAP_CAMERA */