diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-01 10:00:36 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-04 14:45:32 +0200 |
commit | 586b22c0df99dec7e2089ba938cfbd8f96b3ce18 (patch) | |
tree | 27b614da853bb7f1db0e0ea5f7eaa10534ca4f4e /src | |
parent | ba7427b4acf116aca7451ad3a6067dc234d3fa70 (diff) | |
download | qtlocation-mapboxgl-586b22c0df99dec7e2089ba938cfbd8f96b3ce18.tar.gz |
[core] Remove map coordinate setters/getters
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/map.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 3bc4c9f8d9..e2b56b8d55 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -167,24 +167,6 @@ void Map::moveBy(const ScreenCoordinate& point, const AnimationOptions& animatio impl->onUpdate(); } -void Map::setLatLng(const LatLng& latLng, const AnimationOptions& animation) { - easeTo(CameraOptions().withCenter(latLng), animation); -} - -void Map::setLatLng(const LatLng& latLng, const EdgeInsets& padding, const AnimationOptions& animation) { - easeTo(CameraOptions().withCenter(latLng).withPadding(padding), animation); -} - -LatLng Map::getLatLng(const EdgeInsets& padding) const { - return impl->transform.getLatLng(padding); -} - -void Map::resetPosition(const EdgeInsets& padding) { - impl->cameraMutated = true; - impl->transform.jumpTo(CameraOptions().withCenter(LatLng()).withPadding(padding).withZoom(0.0).withBearing(0.0).withPitch(0.0)); - impl->onUpdate(); -} - #pragma mark - Zoom void Map::scaleBy(double scale, optional<ScreenCoordinate> anchor, const AnimationOptions& animation) { @@ -438,7 +420,7 @@ ScreenCoordinate Map::pixelForLatLng(const LatLng& latLng) const { // antimeridian, we unwrap the point longitude so it would be seen if // e.g. the next antimeridian side is visible. LatLng unwrappedLatLng = latLng.wrapped(); - unwrappedLatLng.unwrapForShortestPath(getLatLng()); + unwrappedLatLng.unwrapForShortestPath(impl->transform.getLatLng()); return impl->transform.latLngToScreenCoordinate(unwrappedLatLng); } |