diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-10-27 20:08:47 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-10-31 19:52:08 +0200 |
commit | e0a305247abcf58c4d1d0ef234d7a9b1ba768554 (patch) | |
tree | bf859963e29318eaf15c2fa74a3e6c7c0a0e1d48 /platform/android/src/snapshotter/map_snapshotter.cpp | |
parent | 2d81186fc1b05921c4ca996461b7c743b0a97dec (diff) | |
download | qtlocation-mapboxgl-e0a305247abcf58c4d1d0ef234d7a9b1ba768554.tar.gz |
[android] map snapshotter - expose attributions
Diffstat (limited to 'platform/android/src/snapshotter/map_snapshotter.cpp')
-rw-r--r-- | platform/android/src/snapshotter/map_snapshotter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/android/src/snapshotter/map_snapshotter.cpp b/platform/android/src/snapshotter/map_snapshotter.cpp index a13e91ccd3..3c6623af40 100644 --- a/platform/android/src/snapshotter/map_snapshotter.cpp +++ b/platform/android/src/snapshotter/map_snapshotter.cpp @@ -58,7 +58,9 @@ MapSnapshotter::~MapSnapshotter() = default; void MapSnapshotter::start(JNIEnv&) { MBGL_VERIFY_THREAD(tid); - snapshotCallback = std::make_unique<Actor<mbgl::MapSnapshotter::Callback>>(*Scheduler::GetCurrent(), [this](std::exception_ptr err, PremultipliedImage image, mbgl::MapSnapshotter::PointForFn pointForFn) { + snapshotCallback = std::make_unique<Actor<mbgl::MapSnapshotter::Callback>>( + *Scheduler::GetCurrent(), + [this](std::exception_ptr err, PremultipliedImage image, std::vector<std::string> attributions, mbgl::MapSnapshotter::PointForFn pointForFn) { MBGL_VERIFY_THREAD(tid); android::UniqueEnv _env = android::AttachEnv(); @@ -68,7 +70,7 @@ void MapSnapshotter::start(JNIEnv&) { javaPeer->Call(*_env, onSnapshotFailed, jni::Make<jni::String>(*_env, util::toString(err))); } else { // Create the wrapper - auto mapSnapshot = android::MapSnapshot::New(*_env, std::move(image), pixelRatio, pointForFn); + auto mapSnapshot = android::MapSnapshot::New(*_env, std::move(image), pixelRatio, attributions, pointForFn); // invoke callback static auto onSnapshotReady = javaClass.GetMethod<void (jni::Object<MapSnapshot>)>(*_env, "onSnapshotReady"); |