I tried to make the Google Map move between all the markers on the map and make a screenshot of this map section. For the test did so, but of course it does not work as it should:
button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { for (int i = 0; i < markers.size(); i++) { CameraPosition cameraPosition = new CameraPosition.Builder() .target(new LatLng(markers.get(i).getLatitude(), markers.get(i).getLongitude())) .zoom(15).build(); mGoogleMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); GoogleMap.SnapshotReadyCallback callback = new GoogleMap.SnapshotReadyCallback() { Bitmap bitmap; @Override public void onSnapshotReady(Bitmap snapshot) { bitmap = snapshot; try { String time = String.valueOf(System.currentTimeMillis()); FileOutputStream out = new FileOutputStream("/mnt/sdcard/Android/data/com.app.my/files/" + time + ".png"); //just for test bitmap.compress(Bitmap.CompressFormat.PNG, 90, out); } catch (Exception e) { Log.e(LogTag.MY_FILTER_ERROR, "Screenshot error", e); } } }; mGoogleMap.snapshot(callback); } } }); This code makes the required number of screenshots, but the map does not have time to move between the markers and be loaded. I understand that it should work in a separate thread, please suggest how best to do it.