[core] Add interface to change the orientation through MapOptions
This commit is contained in:
@@ -7,6 +7,7 @@ public:
|
||||
MapMode mapMode = MapMode::Continuous;
|
||||
ConstrainMode constrainMode = ConstrainMode::HeightOnly;
|
||||
ViewportMode viewportMode = ViewportMode::Default;
|
||||
NorthOrientation orientation = NorthOrientation::Upwards;
|
||||
bool crossSourceCollisions = true;
|
||||
};
|
||||
|
||||
@@ -51,4 +52,13 @@ bool MapOptions::crossSourceCollisions() const {
|
||||
return impl_->crossSourceCollisions;
|
||||
}
|
||||
|
||||
MapOptions& MapOptions::withNorthOrientation(NorthOrientation orientation) {
|
||||
impl_->orientation = orientation;
|
||||
return *this;
|
||||
}
|
||||
|
||||
NorthOrientation MapOptions::northOrientation() const {
|
||||
return impl_->orientation;
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user