diff options
Diffstat (limited to 'src/mbgl/map/transform.cpp')
-rw-r--r-- | src/mbgl/map/transform.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mbgl/map/transform.cpp b/src/mbgl/map/transform.cpp index 03a1e117f7..452cb19a09 100644 --- a/src/mbgl/map/transform.cpp +++ b/src/mbgl/map/transform.cpp @@ -323,22 +323,15 @@ void Transform::moveBy(const ScreenCoordinate& offset, const AnimationOptions& a } void Transform::setLatLng(const LatLng& latLng, const AnimationOptions& animation) { - setLatLng(latLng, optional<ScreenCoordinate> {}, animation); -} - -void Transform::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const AnimationOptions& animation) { CameraOptions camera; camera.center = latLng; - camera.padding = padding; easeTo(camera, animation); } -void Transform::setLatLng(const LatLng& latLng, optional<ScreenCoordinate> anchor, const AnimationOptions& animation) { +void Transform::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const AnimationOptions& animation) { CameraOptions camera; camera.center = latLng; - if (anchor) { - camera.padding = EdgeInsets(anchor->y, anchor->x, state.size.height - anchor->y, state.size.width - anchor->x); - } + camera.padding = padding; easeTo(camera, animation); } |