0

I have yandex.yandexmapkit.MapView. I want to create the screenshot from it.

How can I get screenshot from yandex map kit?

TyM6JIep
  • 406
  • 8
  • 23

2 Answers2

1

There are two ways.

First one is using the static Yandex map API (sometimes you aren't need to use complex Mapkit):

http://static-maps.yandex.ru/1.x/?lang=ru-RU&ll=32.810152,39.889847&size=450,450&z=10&l=map

The second way is drawing MapView into Bitmap and it's not difficult.

Community
  • 1
  • 1
Mikalai Daronin
  • 8,590
  • 2
  • 35
  • 47
1

If you don't wanna use static Yandex map API, you can use MapView.getScreenshot() method.

Also, if this method returns null, well, in short, you should try adding xml attributeapp:movable="true" to your MapView.