对于Android,我创建了MapRenderer以使用pin保存快照。但是我在运行后无法在设备中找到任何名为“mapSnapshot”的文件。请告诉我我做错了什么?
//Can't find the image stored
NativeMap.Snapshot(new DelegateSnapshotReadyCallback(snapshot =>
{
var stream = new MemoryStream();
snapshot.Compress(Bitmap.CompressFormat.Png, 0, stream);
stream.Position = 0;
var image = ImageSource.FromStream(()=>new MemoryStream(stream.Capacity));
var filename = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString(), "mapSnapshot.png");
using (FileStream file = new FileStream(filename, FileMode.Create, System.IO.FileAccess.Write))
stream.CopyTo(file);
}));