ConstrainMode gives flexibility to our engine to choose between constraining both vertically and horizontally, or just vertically (default behavior). Constrain in both axis means we can no longer pan the map beyond the map boundaries. This fixes an issue where e.g. annotations disappear upon crossing the map boundaries.
32 lines
745 B
C++
32 lines
745 B
C++
#ifndef MBGL_MAP_MODE
|
|
#define MBGL_MAP_MODE
|
|
|
|
#include <cstdint>
|
|
|
|
namespace mbgl {
|
|
|
|
enum class MapMode : uint8_t {
|
|
Continuous, // continually updating map
|
|
Still, // a once-off still image
|
|
};
|
|
|
|
// We can avoid redundant GL calls when it is known that the GL context is not
|
|
// being shared. In a shared GL context case, we need to make sure that the
|
|
// correct GL configurations are in use - they might have changed between render
|
|
// calls.
|
|
enum class GLContextMode : uint8_t {
|
|
Unique,
|
|
Shared,
|
|
};
|
|
|
|
// We can choose to constrain the map both horizontally or vertically, or only
|
|
// vertically e.g. while panning.
|
|
enum class ConstrainMode : uint8_t {
|
|
HeightOnly,
|
|
WidthAndHeight,
|
|
};
|
|
|
|
} // namespace mbgl
|
|
|
|
#endif // MBGL_MAP_MODE
|