[core] Remove map pitch setters/getters

This commit is contained in:
Bruno de Oliveira Abinader
2019-02-27 19:58:35 +02:00
parent f5f10ec119
commit 21a39306da
7 changed files with 20 additions and 34 deletions

View File

@@ -395,11 +395,12 @@ void NativeMapView::resetPosition(jni::JNIEnv&) {
}
jni::jdouble NativeMapView::getPitch(jni::JNIEnv&) {
return map->getPitch();
return *map->getCameraOptions().pitch;
}
void NativeMapView::setPitch(jni::JNIEnv&, jni::jdouble pitch, jni::jlong duration) {
map->setPitch(pitch, mbgl::AnimationOptions{mbgl::Milliseconds(duration)});
map->easeTo(mbgl::CameraOptions().withPitch(pitch),
mbgl::AnimationOptions{ mbgl::Milliseconds(duration) });
}
void NativeMapView::setZoom(jni::JNIEnv&, jni::jdouble zoom, jni::jdouble x, jni::jdouble y, jni::jlong duration) {