-
Hi there, is it possible in mapsforge vtm to create a bitmap of a mapview? i've tried with drawing on canvas and even pixelcopy. Maybe i'm doing something wrong here, but all bitmaps are blank. Use case is showing miniature bitmaps of a rendered map at a certain zoom level. There seems to be nothing out of the box in mapsforge vtm for this purpose? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Android or desktop? This is OpenGL, better search online how to take OpenGL screenshots from Android |
Beta Was this translation helpful? Give feedback.
-
You can use these functions:
|
Beta Was this translation helpful? Give feedback.
-
yep, thanks! to both of you. I found a way that seems to work :) edit: hm, this only seems to work when the mapView is actually visible on the screen (android). This is the code I use in the main activity where the map currently renders in a layout. However I would like this to all happen in memory. Any pointers on how to do that? without rendering in a view, it gives me this error: IllegalArgumentException: Surface isn't valid, source.isValid() == false
|
Beta Was this translation helpful? Give feedback.
Android or desktop?
This is OpenGL, better search online how to take OpenGL screenshots from Android
GLSurfaceView
or desktop libGDX.