Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

openlayers in webview format in xamarin problem

$
0
0

We implemented openlayers in webview format in xamarin. And when I capture by adding capture function to xamarin,
the map part of openlayers is white and there is no response to xamarin when I use openlayer's export-png function.
I need help with this problem

capture andriod use

public async Task<byte[]> CaptureScreenAsync()
{
var activity = Xamarin.Forms.Forms.Context as MainActivity;
if (activity == null)
{
return null;
}
var view = activity.Window.DecorView;
view.DrawingCacheEnabled = true;
Bitmap bitmap = view.GetDrawingCache(true);
byte[] bitmapData;
using (var stream = new MemoryStream())
{
bitmap.Compress(Bitmap.CompressFormat.Png, 0, stream);
bitmapData = stream.ToArray();
}
return bitmapData;
}


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>