What do you mean by “compose map”? You want to take a screenshot from the Google Map?
m
myanmarking
04/01/2022, 2:50 PM
Legacy GoogleMap has a method
snapshot
which generates a bitmap of the map content. Compose version has no such method, nor indirect access to GoogleMap instance.
o
Oleksandr Balan
04/01/2022, 3:00 PM
Aha, then I am not aware of the compose version of ot 😅
In our recent project we do use normal GoogleMap and use snapshot method to take a screenshot
Moreover our use case was just to use a map to take a screenshot and then show a bitmap instead of a map
Oleksandr Balan
04/01/2022, 3:01 PM
Is it something you want to achieve? Or is your use-case different?
m
myanmarking
04/01/2022, 3:03 PM
i just ported the map code to compose and it worked flawlessly for everything. But i forgot that we had a feature that required a snapshot of the map. I didn’t realise until the end. It looks like compose map library doesn’t have that feature yet. I solved the problem by accessing the legacy GoogleMap with reflection and invoking
snapshot
method.
o
Oleksandr Balan
04/01/2022, 3:22 PM
Ah, I get it, I did not work with the compose version of the map, sry :/