diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2018-05-30 12:16:04 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-05-31 07:23:06 +0200 |
commit | 930d0bc17ca91176603df7f350bbff71fed8c75d (patch) | |
tree | df0653a7c2df4e45f45695dc94413931d840677b /platform/android | |
parent | 48940939718431effcb772c349439e6e93ef63f8 (diff) | |
download | qtlocation-mapboxgl-930d0bc17ca91176603df7f350bbff71fed8c75d.tar.gz |
[core] [android] - optional map snapshotter camera position
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/src/snapshotter/map_snapshotter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/android/src/snapshotter/map_snapshotter.cpp b/platform/android/src/snapshotter/map_snapshotter.cpp index 8c064f5707..155fdf81fb 100644 --- a/platform/android/src/snapshotter/map_snapshotter.cpp +++ b/platform/android/src/snapshotter/map_snapshotter.cpp @@ -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); |