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
I want to ground overlay an image taken by my DJI on the map where is place in the drawable folder of my app. I search a lot but I'm stuck. If soemone have a solution or a lead I wourld be grateful.
The text was updated successfully, but these errors were encountered:
This may be the long way around the barn...but I've been using the FromStream option to do this without any problem.
string overlayIndex = "1" //Manage this as you see fit - just and example
_Overlay = new GroundOverlay()
{
Bounds = new Bounds(new Position(46.32, 5.51), new Position(46.45, 5.61)),
Icon = BitmapDescriptorFactory.FromStream(ToStream(bitmap_path), id:overlayIndex),
//Icon = BitmapDescriptorFactory.FromBundle("DJI_0962.jpg"),
Tag = "THE GROUNDOVERLAY",
ZIndex = 2
};
Then I built a little helper function to read the image into a stream...
public Stream ToStream(SkiaSharp.SKBitmap image)
{
var data = image.Encode(SkiaSharp.SKEncodedImageFormat.Png, 100);
var myStream = new System.IO.MemoryStream();
data.SaveTo(myStream);
return myStream;
}
So into a stream and then out to the BitmapDescriptorFactory.
VERSIONS
PLATFORMS
ACTUAL BEHAVIOR
ACTUAL SCREENSHOTS/STACKTRACE
I want to ground overlay an image taken by my DJI on the map where is place in the drawable folder of my app. I search a lot but I'm stuck. If soemone have a solution or a lead I wourld be grateful.
The text was updated successfully, but these errors were encountered: