[core] Remove error-prone setlatLng overload

This commit is contained in:
Bruno de Oliveira Abinader
2018-11-23 15:26:10 +02:00
parent 9d1d4ecdb8
commit e8f7866e9e
5 changed files with 5 additions and 20 deletions

View File

@@ -323,7 +323,9 @@ void Transform::moveBy(const ScreenCoordinate& offset, const AnimationOptions& a
}
void Transform::setLatLng(const LatLng& latLng, const AnimationOptions& animation) {
setLatLng(latLng, optional<ScreenCoordinate> {}, animation);
CameraOptions camera;
camera.center = latLng;
easeTo(camera, animation);
}
void Transform::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const AnimationOptions& animation) {
@@ -333,15 +335,6 @@ void Transform::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const
easeTo(camera, animation);
}
void Transform::setLatLng(const LatLng& latLng, optional<ScreenCoordinate> anchor, 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);
}
easeTo(camera, animation);
}
void Transform::setLatLngZoom(const LatLng& latLng, double zoom, const AnimationOptions& animation) {
setLatLngZoom(latLng, zoom, EdgeInsets(), animation);
}