[android] - allow snapshot generation without overlain view content

This commit is contained in:
tobrun
2019-04-12 15:04:14 +02:00
committed by Tobrun
parent 714b2bcdc6
commit 19c6010ff2

View File

@@ -1047,10 +1047,15 @@ final class NativeMapView implements NativeMap {
if (checkState("OnSnapshotReady")) {
return;
}
Bitmap viewContent = viewCallback.getViewContent();
if (snapshotReadyCallback != null && mapContent != null && viewContent != null) {
snapshotReadyCallback.onSnapshotReady(BitmapUtils.mergeBitmap(mapContent, viewContent));
if (snapshotReadyCallback != null && mapContent != null) {
if (viewCallback == null) {
snapshotReadyCallback.onSnapshotReady(mapContent);
} else {
Bitmap viewContent = viewCallback.getViewContent();
if (viewContent != null) {
snapshotReadyCallback.onSnapshotReady(BitmapUtils.mergeBitmap(mapContent, viewContent));
}
}
}
}