[core] [android] - optional map snapshotter camera position

This commit is contained in:
tobrun
2018-05-30 12:16:04 +02:00
committed by Tobrun
parent 4894093971
commit 930d0bc17c
3 changed files with 14 additions and 6 deletions

View File

@@ -38,7 +38,12 @@ MapSnapshotter::MapSnapshotter(jni::JNIEnv& _env,
jFileSource = FileSource::getNativePeer(_env, _jFileSource);
auto& fileSource = mbgl::android::FileSource::getDefaultFileSource(_env, _jFileSource);
auto size = mbgl::Size { static_cast<uint32_t>(width), static_cast<uint32_t>(height) };
auto cameraOptions = position ? CameraPosition::getCameraOptions(_env, position) : CameraOptions();
optional<mbgl::CameraOptions> cameraOptions;
if (position) {
cameraOptions = CameraPosition::getCameraOptions(_env, position);
}
optional<mbgl::LatLngBounds> bounds;
if (region) {
bounds = LatLngBounds::getLatLngBounds(_env, region);