[core] Add interface to change the orientation through MapOptions

This commit is contained in:
Sudarsana Babu Nagineni
2019-03-25 23:39:31 +02:00
parent e639087c91
commit 11afef7825
7 changed files with 33 additions and 11 deletions

View File

@@ -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