[core] Remove support for setting minimum and maximum pitch
Support for limiting pitch was introduced in commit c4fc89977b ([core]
Added {set,get}{Min,Max}Pitch) in 2017 but was never exposed by the
platform SDKs. Simplify the Map interface by removing this unused
feature.
v2: Add util::PITCH_MIN
This commit is contained in:
@@ -307,28 +307,6 @@ double Map::getMaxZoom() const {
|
||||
return impl->transform.getState().getMaxZoom();
|
||||
}
|
||||
|
||||
void Map::setMinPitch(double minPitch) {
|
||||
impl->transform.setMinPitch(minPitch * util::DEG2RAD);
|
||||
if (impl->transform.getPitch() < minPitch) {
|
||||
jumpTo(CameraOptions().withPitch(minPitch));
|
||||
}
|
||||
}
|
||||
|
||||
double Map::getMinPitch() const {
|
||||
return impl->transform.getState().getMinPitch() * util::RAD2DEG;
|
||||
}
|
||||
|
||||
void Map::setMaxPitch(double maxPitch) {
|
||||
impl->transform.setMaxPitch(maxPitch * util::DEG2RAD);
|
||||
if (impl->transform.getPitch() > maxPitch) {
|
||||
jumpTo(CameraOptions().withPitch(maxPitch));
|
||||
}
|
||||
}
|
||||
|
||||
double Map::getMaxPitch() const {
|
||||
return impl->transform.getState().getMaxPitch() * util::RAD2DEG;
|
||||
}
|
||||
|
||||
#pragma mark - Size
|
||||
|
||||
void Map::setSize(const Size size) {
|
||||
|
||||
Reference in New Issue
Block a user