[core] Remove error-prone setlatLng overload
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user