[core] Remove map zoom setters/getters

This commit is contained in:
Bruno de Oliveira Abinader
2019-02-27 19:01:29 +02:00
parent 491fce6879
commit f5f10ec119
19 changed files with 112 additions and 131 deletions

View File

@@ -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) {