[core] Added {set,get}{Min,Max}Pitch

This commit is contained in:
Bruno de Oliveira Abinader
2017-04-03 18:37:03 +03:00
parent c1c6c1e298
commit c4fc89977b
7 changed files with 83 additions and 2 deletions

View File

@@ -698,6 +698,28 @@ double Map::getMaxZoom() const {
return impl->transform.getState().getMaxZoom();
}
void Map::setMinPitch(double minPitch) {
impl->transform.setMinPitch(minPitch * util::DEG2RAD);
if (getPitch() < minPitch) {
setPitch(minPitch);
}
}
double Map::getMinPitch() const {
return impl->transform.getState().getMinPitch() * util::RAD2DEG;
}
void Map::setMaxPitch(double maxPitch) {
impl->transform.setMaxPitch(maxPitch * util::DEG2RAD);
if (getPitch() > maxPitch) {
setPitch(maxPitch);
}
}
double Map::getMaxPitch() const {
return impl->transform.getState().getMaxPitch() * util::RAD2DEG;
}
#pragma mark - Size
void Map::setSize(const Size size) {