You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
If this is a high requirement you can work around this issue for now by opting in to use TexureView as a rendering surface. You can use this feature through xml or MapboxMapOptions. After you need to get a reference to TextureView and execute: textureView.getBitmap();
To resolve this issue for SurfaceView we will need to draw all overlain views to a bitmap and merge that bitmap with the current snapshotted bitmap.
Been working on this, and was able to get it working with merging a bitmap of the snapshot with a bitmap of the View hierarchy. If needed, you can use the following methods to work around the issue yourself:
What you need to do is call into createBitmapFromView with mapView and call into mergeBitmap with the bitmap from the callback and the bitmap from createBitmapFromView
Activity
Reakleases commentedon Jun 2, 2017
agree same issue on android 5.1
14v commentedon Jun 4, 2017
I tried to
getDrawableCachefromMapViewto get bitmap with markers.eglSwapBufferserror occurs.Occurs on Android 4.4.4, Samsung T-365, on 5.1.1 does not reproduce.
Also calling
MapView.drawon new canvas causes that error.sibuty commentedon Jun 5, 2017
Agree with this issue.
Very urgent task for me.
up
tobrun commentedon Jun 6, 2017
If this is a high requirement you can work around this issue for now by opting in to use TexureView as a rendering surface. You can use this feature through xml or MapboxMapOptions. After you need to get a reference to TextureView and execute:
textureView.getBitmap();To resolve this issue for SurfaceView we will need to draw all overlain views to a bitmap and merge that bitmap with the current snapshotted bitmap.
tobrun commentedon Jun 13, 2017
Been working on this, and was able to get it working with merging a bitmap of the snapshot with a bitmap of the View hierarchy. If needed, you can use the following methods to work around the issue yourself:
What you need to do is call into
createBitmapFromViewwithmapViewand call intomergeBitmapwith thebitmapfrom the callback and thebitmapfromcreateBitmapFromViewtobrun commentedon Jun 13, 2017
tobrun commentedon Jun 13, 2017
PR for this in #9252
14v commentedon Jun 13, 2017
I used similar code
It works, but need to call
mapView.getDrawingCache()before getting snapshot. If to call insideSnapshotReadyCallbackgoteglSwapBufferserror.tobrun commentedon Jun 13, 2017
Adding this to the 5.1.0 milestone