@@ -22,6 +22,7 @@ MapSnapshotter::MapSnapshotter(jni::JNIEnv& _env,
22
22
jni::String styleURL,
23
23
jni::Object<LatLngBounds> region,
24
24
jni::Object<CameraPosition> position,
25
+ jni::jboolean _showLogo,
25
26
jni::String _programCacheDir)
26
27
: javaPeer(SeizeGenericWeakRef(_env, jni::Object<MapSnapshotter>(jni::NewWeakGlobalRef(_env, _obj.Get()).release())))
27
28
, pixelRatio(_pixelRatio)
@@ -41,6 +42,8 @@ MapSnapshotter::MapSnapshotter(jni::JNIEnv& _env,
41
42
bounds = LatLngBounds::getLatLngBounds (_env, region);
42
43
}
43
44
45
+ showLogo = _showLogo;
46
+
44
47
// Create the core snapshotter
45
48
snapshotter = std::make_unique<mbgl::MapSnapshotter>(fileSource,
46
49
*threadPool,
@@ -70,7 +73,7 @@ void MapSnapshotter::start(JNIEnv&) {
70
73
javaPeer->Call (*_env, onSnapshotFailed, jni::Make<jni::String>(*_env, util::toString (err)));
71
74
} else {
72
75
// Create the wrapper
73
- auto mapSnapshot = android::MapSnapshot::New (*_env, std::move (image), pixelRatio, attributions, pointForFn);
76
+ auto mapSnapshot = android::MapSnapshot::New (*_env, std::move (image), pixelRatio, attributions, showLogo, pointForFn);
74
77
75
78
// invoke callback
76
79
static auto onSnapshotReady = javaClass.GetMethod <void (jni::Object<MapSnapshot>)>(*_env, " onSnapshotReady" );
@@ -117,7 +120,7 @@ void MapSnapshotter::registerNative(jni::JNIEnv& env) {
117
120
118
121
// Register the peer
119
122
jni::RegisterNativePeer<MapSnapshotter>(env, MapSnapshotter::javaClass, " nativePtr" ,
120
- std::make_unique<MapSnapshotter, JNIEnv&, jni::Object<MapSnapshotter>, jni::Object<FileSource>, jni::jfloat, jni::jint, jni::jint, jni::String, jni::Object<LatLngBounds>, jni::Object<CameraPosition>, jni::String>,
123
+ std::make_unique<MapSnapshotter, JNIEnv&, jni::Object<MapSnapshotter>, jni::Object<FileSource>, jni::jfloat, jni::jint, jni::jint, jni::String, jni::Object<LatLngBounds>, jni::Object<CameraPosition>, jni::jboolean, jni:: String>,
121
124
" nativeInitialize" ,
122
125
" finalize" ,
123
126
METHOD (&MapSnapshotter::setStyleUrl, " setStyleUrl" ),
0 commit comments