diff options
Diffstat (limited to 'platform/android/src/native_map_view.cpp')
-rwxr-xr-x | platform/android/src/native_map_view.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index e8bc14c8c2..4755cc28c4 100755 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -403,15 +403,16 @@ void NativeMapView::setPitch(jni::JNIEnv&, jni::jdouble pitch, jni::jlong durati } void NativeMapView::setZoom(jni::JNIEnv&, jni::jdouble zoom, jni::jdouble x, jni::jdouble y, jni::jlong duration) { - map->setZoom(zoom, mbgl::ScreenCoordinate{x,y}, mbgl::AnimationOptions{mbgl::Milliseconds(duration)}); + map->easeTo(mbgl::CameraOptions().withZoom(zoom).withAnchor(mbgl::ScreenCoordinate{ x, y }), + mbgl::AnimationOptions{ mbgl::Milliseconds(duration) }); } jni::jdouble NativeMapView::getZoom(jni::JNIEnv&) { - return map->getZoom(); + return *map->getCameraOptions().zoom; } void NativeMapView::resetZoom(jni::JNIEnv&) { - map->resetZoom(); + map->jumpTo(mbgl::CameraOptions().withZoom(0.0)); } void NativeMapView::setMinZoom(jni::JNIEnv&, jni::jdouble zoom) { |