[core] Remove error-prone setlatLng overload
This commit is contained in:
@@ -75,7 +75,6 @@ public:
|
||||
|
||||
// Position
|
||||
void moveBy(const ScreenCoordinate&, const AnimationOptions& = {});
|
||||
void setLatLng(const LatLng&, optional<ScreenCoordinate>, const AnimationOptions& = {});
|
||||
void setLatLng(const LatLng&, const EdgeInsets&, const AnimationOptions& = {});
|
||||
void setLatLng(const LatLng&, const AnimationOptions& = {});
|
||||
LatLng getLatLng(const EdgeInsets& = {}) const;
|
||||
|
||||
@@ -1579,7 +1579,7 @@ public:
|
||||
{
|
||||
CLLocationCoordinate2D centerCoordinate = _previousPinchCenterCoordinate;
|
||||
self.mbglMap.setLatLng(MGLLatLngFromLocationCoordinate2D(centerCoordinate),
|
||||
mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y });
|
||||
mbgl::EdgeInsets { centerPoint.y, centerPoint.x, self.size.height - centerPoint.y, self.size.width - centerPoint.x });
|
||||
}
|
||||
}
|
||||
[self cameraIsChanging];
|
||||
|
||||
@@ -304,7 +304,7 @@ void Map::moveBy(const ScreenCoordinate& point, const AnimationOptions& animatio
|
||||
|
||||
void Map::setLatLng(const LatLng& latLng, const AnimationOptions& animation) {
|
||||
impl->cameraMutated = true;
|
||||
setLatLng(latLng, optional<ScreenCoordinate> {}, animation);
|
||||
setLatLng(latLng, animation);
|
||||
}
|
||||
|
||||
void Map::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const AnimationOptions& animation) {
|
||||
@@ -313,12 +313,6 @@ void Map::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const Anima
|
||||
impl->onUpdate();
|
||||
}
|
||||
|
||||
void Map::setLatLng(const LatLng& latLng, optional<ScreenCoordinate> anchor, const AnimationOptions& animation) {
|
||||
impl->cameraMutated = true;
|
||||
impl->transform.setLatLng(latLng, anchor, animation);
|
||||
impl->onUpdate();
|
||||
}
|
||||
|
||||
LatLng Map::getLatLng(const EdgeInsets& padding) const {
|
||||
return impl->transform.getLatLng(padding);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ public:
|
||||
void moveBy(const ScreenCoordinate& offset, const AnimationOptions& = {});
|
||||
void setLatLng(const LatLng&, const AnimationOptions& = {});
|
||||
void setLatLng(const LatLng&, const EdgeInsets&, const AnimationOptions& = {});
|
||||
void setLatLng(const LatLng&, optional<ScreenCoordinate>, const AnimationOptions& = {});
|
||||
void setLatLngZoom(const LatLng&, double zoom, const AnimationOptions& = {});
|
||||
void setLatLngZoom(const LatLng&, double zoom, const EdgeInsets&, const AnimationOptions& = {});
|
||||
LatLng getLatLng(const EdgeInsets& = {}) const;
|
||||
|
||||
Reference in New Issue
Block a user