diff options
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r-- | src/mbgl/map/map.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 5aff7a2b78..ed20ec24a6 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -407,15 +407,11 @@ void Map::moveBy(double dx, double dy, std::chrono::steady_clock::duration durat update(); } -void Map::setLonLat(double lon, double lat, std::chrono::steady_clock::duration duration) { - transform.setLonLat(lon, lat, duration); +void Map::setLatLng(LatLng latLng, std::chrono::steady_clock::duration duration) { + transform.setLatLng(latLng, duration); update(); } -void Map::getLonLat(double& lon, double& lat) const { - transform.getLonLat(lon, lat); -} - void Map::startPanning() { transform.startPanning(); update(); @@ -428,7 +424,7 @@ void Map::stopPanning() { void Map::resetPosition() { transform.setAngle(0); - transform.setLonLat(0, 0); + transform.setLatLng(LatLng(0, 0)); transform.setZoom(0); update(); } @@ -459,15 +455,11 @@ double Map::getZoom() const { return transform.getZoom(); } -void Map::setLonLatZoom(double lon, double lat, double zoom, std::chrono::steady_clock::duration duration) { - transform.setLonLatZoom(lon, lat, zoom, duration); +void Map::setLatLngZoom(LatLng latLng, double zoom, std::chrono::steady_clock::duration duration) { + transform.setLatLngZoom(latLng, zoom, duration); update(); } -void Map::getLonLatZoom(double& lon, double& lat, double& zoom) const { - transform.getLonLatZoom(lon, lat, zoom); -} - void Map::resetZoom() { setZoom(0); } @@ -697,7 +689,7 @@ void Map::prepare() { void Map::render() { assert(painter); painter->render(*style, activeSources, - state, animationTime); + state, animationTime); // Schedule another rerender when we definitely need a next frame. if (transform.needsTransition() || style->hasTransitions()) { update(); |