[core] Added Map::scaleBy()

This commit is contained in:
Bruno de Oliveira Abinader
2019-02-27 17:49:01 +02:00
parent 362231e2d0
commit 02f2b9c75c
4 changed files with 10 additions and 4 deletions

View File

@@ -187,6 +187,11 @@ void Map::resetPosition(const EdgeInsets& padding) {
#pragma mark - Zoom
void Map::scaleBy(double scale, optional<ScreenCoordinate> anchor, const AnimationOptions& animation) {
double zoom = getZoom() + impl->transform.getState().scaleZoom(scale);
easeTo(CameraOptions().withZoom(zoom).withAnchor(anchor), animation);
}
void Map::setZoom(double zoom, const AnimationOptions& animation) {
easeTo(CameraOptions().withZoom(zoom), animation);
}