0

I would like to save the camera view of a map fragment with the marker of my location in my android app as a picture, so that I can display it in another activity. Is there any way to do that?

If that doesn't work I thought about just saving the address or location object and to put it in a map view and somehow disable interaction of the user, because it should really just display the location.

Thanks for answering.

Kerstin M.
  • 29
  • 3

1 Answers1

3

Yes there is a built-in method for that. But first you need to obtain the GoogleMap map instance.

 GoogleMap map = .....

 map.snapshot(new GoogleMap.SnapshotReadyCallback() {
                   @Override
                   public void onSnapshotReady(Bitmap bitmap) {
                     // Do whatever here
                   }
               });
Enzokie
  • 7,365
  • 6
  • 33
  • 39